Hi!
I have access to machines that don’t allow me to download anything from the web, so I had difficulties installing software with Opam.
With the help of Raja from OCamlPro, I came to a practical solution that solved my problem, and I turned it into a script: https://github.com/scemama/OpamPack
It is a simple script that makes a tar.gz on your local machine with all the dependencies you need, and then you can copy the tar.gz
o the remote isolated machine and install everything using Opam without needing the network.
Enjoy!
there is also opam - opam-bundle
Nice, allows to get a source-based installer for an opam package!
I think it is possible to create a local mirror of the opam-repository, but this would be a much heavier
solution (you need to download many tarballs). Also, I don’t even remember where was the script
to do that; probably one of the maintenance script used by people maintaining the opam repository https://opam.ocaml.org.
The added benefit is that if you have a local opam repository, you can basically install any opam package
without network access (provided all the system dependencies are already installed).
I don’t know if it’s your case, but if you’re in the situation where:
- you’re using ssh to connect to the machine
- the connecting-from machine has access to the internet
- the connected-to machine can not make outbound connections to the internet
Then you can also use a ssh reverse tunnel to provide internet access to the machine you’re connected to while the ssh connection is active. The relevant feature is documented in the -R
flag of the ssh
man page.
@emillon It is exactly what you are talking about. The access to the outside is forbidden for security motivations, so the admins also disabled the possibility to do tunneling.