-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make bootstrap use _checkouts #2642
Conversation
This makes it possible to run the bootstrap offline by placing the deps in the using the already documented _checkouts directory in advance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ferd In the EEF meeting you agreed to merge this. Any thoughts? |
I was supposed to test various vendoring strategies but went to vacation during the holidays without having had time to try that first. |
Ran a quick Demo with John. The short version of it: Rebar3 can seemingly support the type of vendoring the Ericsson team requires in the following way:
This will make the vendored app be tracked locally in source and rebar3 will not even attempt to fetch it. The caveats we have:
|
That's right. I've tried to put them all under |
This is what the other PR #2643 is for. |
Yeah, #2643 may be more useful, though I'll need to take another look to properly cover network stuff there, to properly prevent all sorts of dep fetches and plugin uses. It's a bit broader than what is currently defined and there may be better hook points for it. Oh and things like hooks and plugins themselves can call the network and can't be covered by any of this either. This is always going to be an imperfect solution compared to permissions work. |
I still need to bootstrap rebar3 (without the undocumented way of manually copying the deps into |
@ferd After today's EEF meeting, I thought quickly about how using Idea:
WDYT? |
See #2689 for my attempt at automating the first step. This would on its own handle most cases, and could work in conjunction with an offline mode switch that could be added separately. |
I did a hack that at least makes it possible to bootstrap rebar3 in its current state, though the method is as mentioned not documented nor supported so could break at any time. My hack does this: On a machine with internet access run this: git clone https://github.com/erlang/rebar3
cd rebar3
REBAR_CACHE_DIR=$(pwd)/cache ./bootstrap
rm -rf _build/default/lib/rebar _build/default/lib/*/ebin
git add -f _build/default/lib cache
git commit -m "Add bootstrap dependencies to repository" And then you push this to your own repo and when on the machine without internet access you just do: REBAR_CACHE_DIR=$(pwd)/cache ./bootstrap --offline and it should create rebar3 without having to access the internet. Just thought I'd share what I did until this can be done in a supported way. |
FWIW, @weiss created https://github.com/weiss/rebar3 so that I can get a tarball with all required sources included that I can use for the Debian package, which is required to build rebar3 from source completely offline. |
Good to know there are more workarounds. This PR will most likely be closed soon. The way forward is that rebar3 will vendor its deps using the new vendoring mechanism added in #2689. This means the rebar3 repo (and tar.gz releases) will contain all rebar3's deps. I haven't found any PR or issue tracking this though, so I don't know the progress of it. |
We're currently trying to see if we can release a Relx version, then we can release Rebar3 3.19, and then I start the vendoring mode in main. |
Closed in favor of #2720. |
This makes it possible to run the bootstrap offline by placing the deps
in the already documented _checkouts directory in advance.