Skip to content
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

Add a note in the 'Distribution file directories' #19396

Open
evn10 opened this issue Sep 2, 2023 · 5 comments
Open

Add a note in the 'Distribution file directories' #19396

evn10 opened this issue Sep 2, 2023 · 5 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: documentation (cleanup)

Comments

@evn10
Copy link

evn10 commented Sep 2, 2023

Page link:

https://bazel.build/run/build#running-bazel-in-an-airgapped-environment

Problem description (include actual vs expected text, if applicable):

It took me a while to understand that the the tar files need to be located in the directory uncompressed. I would be nice to just add a little note or an an example, e.g. (I was using the cpp-tuturial and had to include this to make it work)

$HOME/bazel/repos
|----- rules_cc-0.0.2.tar.gz
|----- bazelci_rules-1.0.0.tar.gz

bazel run --distdir=$HOME/bazel/repos //main:hello-world

Where do you see this issue? (include link to specific section of the page, if applicable)

It is not really an issue, just make the documentation a bit clearer

Any other information you'd like to share?

This entry on stackoverflow put me on the right track

https://stackoverflow.com/questions/67077183/bazel-build-air-gapped

@evn10 evn10 added team-Documentation Documentation improvements that cannot be directly linked to other team labels type: documentation (cleanup) untriaged labels Sep 2, 2023
@keertk
Copy link
Member

keertk commented Sep 19, 2023

Hi @evn10 would you be open to submitting a PR for this? Thanks!

@keertk keertk added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Sep 19, 2023
@evn10
Copy link
Author

evn10 commented Jan 9, 2024

Hi @evn10 would you be open to submitting a PR for this? Thanks!
Apologies for the late reply, I am actually a newbie on bazel and not a professional developer but rather a bazel enthousiast. In the meantime, I managed to move to bazel 7.0 where things are a bit different. So in short, yes I am open for submitting a PR for this (and maybe some other items which I came across during my journey).

@evn10
Copy link
Author

evn10 commented Jan 10, 2024

Hi again,

I tried to create a PR (draft and otherwise) but that rejected as I am not a collaborator. I don't really see how I have to handle that so I publish her what I intended to put in the PR (so apologies for the blast):

-----(snip)----
In the section "Repository cache (with Bazel 7 or later)", it is mentioned to use the repository cache. In my case, I cannot use a 'source' server as our servers are not connected to the Internet [ I use a Windows 10 VDI and a Linux Redhat 7 server with no Internet access]. Therefore, I propose to add the following text at the end of section Repository cache (with Bazel 7 or later)':
"In case you don't have an 'source' server with Internet connectivity to execute the above procedure, the --dist_dir option still works in Bazel 7. This might be a path to follow in case if you don't have access. The --repository_cache option is preferred in case you don't experience this constraint. Some considerations :

  • The packages will need to be downloaded manually using a web browser. This sounds more dramatic as only a dozen or so packages are to be downloaded. The following entries could be added to the .bazelrc file or the ~/.bazelrc can be used instead on each of the target platforms without the :windows and :linux extensions on the tags :
build:windows --distdir=C:\\path\\to\\repository
test:linux --distdir=/path/to/repository
  • Packages are to be kept compressed (either tar.gz or zip).
  • Some packages (e.g. rules_proto-4.0.0.zip) are not picked up automatically. A workaround is to add the following entries in the MODULE.bazel file and create a symbolic link in the third_party directory at the project root directory :
bazel_dep(name = "rules_proto", version = "4.0.0")
local_path_override(module_name = "rules_proto", path = "third_party/rules_proto")
rules_proto = use_extension("@rules_proto//:*", "rules_proto")

The location of the repository cache can be found by using bazel info repository_cache.
-----(snip)----

@keertk, is it possible to take a look at the above please and advice on how to proceed?

@keertk
Copy link
Member

keertk commented Jan 24, 2024

Hi @evn10 apologies for the delay. Could you please look into creating a PR for this? You should be able to submit one by forking this repo, even without being a collaborator.
We unfortunately won't be able to submit these changes on your behalf.
Thanks!

evn10 added a commit to evn10/bazel that referenced this issue Jan 30, 2024
…e (with Bazel 7 or later)"

In the section "Repository cache (with Bazel 7 or later)", it is mentioned to use the repository cache. In my case, I cannot use a 'source' server as our servers are not connected to the Internet [ I use a Windows 10 VDI and a Linux Redhat 7 server with no Internet access].

Issue bazelbuild#19396
evn10 added a commit to evn10/bazel that referenced this issue Jan 30, 2024
… later)

In the section "Repository cache (with Bazel 7 or later)", it is mentioned to use the repository cache. In my case, I cannot use a 'source' server as our servers are not connected to the Internet [ I use a Windows 10 VDI and a Linux Redhat 7 server with no Internet access]. 

More details in Issue bazelbuild#19396
@evn10
Copy link
Author

evn10 commented Jan 30, 2024

Hi @evn10 would you be open to submitting a PR for this? Thanks!

Sorry, it took a while being a nob :-) The PR is #21136. I'll close this issue for now.

Thanks for all your help, I hope that the PR makes sense.

Have a nice day,
Erik

@sgowroji sgowroji added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

5 participants