caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] How to create a local opam repository for offline use?
@ 2016-01-04  8:39 Francois Berenger
  2016-01-04 14:41 ` François Bobot
  0 siblings, 1 reply; 3+ messages in thread
From: Francois Berenger @ 2016-01-04  8:39 UTC (permalink / raw)
  To: caml users

Hello,

What is the current procedure to prepare an opam repository
so that a machine that has no internet access can still use
opam ?

Furthermore, is it possible to create a minimal opam repository,
so also for offline use, but let's say I know only a single
software with all its dependencies will be installed by the
offline machine.
Because, I am foreseeing that downloading all tarballs of all possible
ocaml software/libraries might exhaust my patience.

Thanks a lot and happy new year.

-- 
Francois.
"When in doubt, use more types"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] How to create a local opam repository for offline use?
  2016-01-04  8:39 [Caml-list] How to create a local opam repository for offline use? Francois Berenger
@ 2016-01-04 14:41 ` François Bobot
  2016-01-04 16:08   ` Francois Berenger
  0 siblings, 1 reply; 3+ messages in thread
From: François Bobot @ 2016-01-04 14:41 UTC (permalink / raw)
  To: caml-list

Hello,

On 04/01/2016 09:39, Francois Berenger wrote:
> What is the current procedure to prepare an opam repository
> so that a machine that has no internet access can still use
> opam ?
>
> Furthermore, is it possible to create a minimal opam repository,
> so also for offline use, but let's say I know only a single
> software with all its dependencies will be installed by the
> offline machine.
> Because, I am foreseeing that downloading all tarballs of all possible
> ocaml software/libraries might exhaust my patience.

The relevant issues are, I think:
https://github.com/ocaml/opam/issues/2098

And a PR that solve some remaining problems with virtual packages:
https://github.com/ocaml/opam/pull/2257

However I need to rewrite it in order to have something less hackish.

-- 
François

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] How to create a local opam repository for offline use?
  2016-01-04 14:41 ` François Bobot
@ 2016-01-04 16:08   ` Francois Berenger
  0 siblings, 0 replies; 3+ messages in thread
From: Francois Berenger @ 2016-01-04 16:08 UTC (permalink / raw)
  To: caml-list

On 01/04/2016 03:41 PM, François Bobot wrote:
> Hello,
>
> On 04/01/2016 09:39, Francois Berenger wrote:
>> What is the current procedure to prepare an opam repository
>> so that a machine that has no internet access can still use
>> opam ?
>>
>> Furthermore, is it possible to create a minimal opam repository,
>> so also for offline use, but let's say I know only a single
>> software with all its dependencies will be installed by the
>> offline machine.
>> Because, I am foreseeing that downloading all tarballs of all possible
>> ocaml software/libraries might exhaust my patience.
>
> The relevant issues are, I think:
> https://github.com/ocaml/opam/issues/2098
>
> And a PR that solve some remaining problems with virtual packages:
> https://github.com/ocaml/opam/pull/2257
>
> However I need to rewrite it in order to have something less hackish.

OK, thanks for the info, so here is a recipe that worked for me:

wget https://github.com/ocaml/opam-repository/archive/master.tar.gz
tar xzf master.tar.gz
cd opam-repository-master
opam-admin make --resolve PKG
# here I needed to remove
# ocamlbuild from the depends field in the opam file of several packages
# so that the solver finally succeed, so opam-admin-make probably has
# a bug
opam repo add offline $PWD
opam repo remove default # then I have only one opam repository setup
# here I turned off my network card
opam update
opam install PKG # worked using tarballs from the local-disk only

-- 
Regards,
Francois.
"When in doubt, use more types"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-04 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04  8:39 [Caml-list] How to create a local opam repository for offline use? Francois Berenger
2016-01-04 14:41 ` François Bobot
2016-01-04 16:08   ` Francois Berenger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).