caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anil Madhavapeddy <anil@recoil.org>
To: Arlen Cox <arlencox@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Offline opam
Date: Tue, 4 Oct 2016 17:17:43 +0100	[thread overview]
Message-ID: <5BF40816-67CA-428B-8A7A-7029825C75D7@recoil.org> (raw)
In-Reply-To: <CAHEcMuFdD=fAW5AcVf4HNVFtKQHhAk-Mtez44iLSXDzyVDMeFQ@mail.gmail.com>

In OPAM 1.2.2, you have to add a compilers/ directory to the repository
and point the 'src' field to a local network location; e.g. see this one for 4.03
https://github.com/ocaml/opam-repository/blob/master/compilers/4.03.0/4.03.0/4.03.0.comp

In OPAM 2dev, the OCaml compiler packages are no longer special cased
and are normal packages, and so they will be made available offline via
`opam admin` in exactly the same way as packages are now.

I've just published a set of OPAM2dev Docker images at:
https://hub.docker.com/r/ocaml/opam-dev/
with various distro and OCaml version combinations that might be useful if you
want to test-drive the functionality.

regards
Anil

> On 4 Oct 2016, at 17:09, Arlen Cox <arlencox@gmail.com> wrote:
> 
> Hi Anil,
> 
> There appears to be no issue installing packages, but switch does not
> seem to work.
> 
> 'opam switch 4.03' connects via http to download the compiler.  How do
> I make the compiler versions available offline as well?
> 
> Thanks,
> Arlen
> 
> On Tue, Oct 4, 2016 at 5:55 AM, Anil Madhavapeddy <anil@recoil.org> wrote:
>> On 3 Oct 2016, at 19:05, Arlen Cox <arlencox@gmail.com> wrote:
>>> 
>>> Hi all,
>>> 
>>> Is there good documentation anywhere on how to make an offline opam
>>> repo?  I would like to be able to use the repo just like I would opam
>>> with an internet connection.
>>> 
>>> I would like to be able to do the following:
>>> - Install any package: opam install package_x
>>> - Search for any package: opam search package_y
>>> - Switch the compiler (even if I have not yet installed that
>>> compiler version): opam switch 4.02.0
>>> 
>>> Using opam-admin make, I can cause all packages to be downloaded, but
>>> they're tagged with the compiler version that I used to fetch them.
>>> This means that if I run a switch, the existing archives are no longer
>>> valid (I presume).  Furthermore none of the ocaml compiler sources are
>>> downloaded, so I cannot actually use opam switch with this install.
>> 
>> Dear Arlen,
>> 
>> The OPAM archives generated by `opam admin make` should be
>> independent of the version of the compiler that has been selected.
>> They are placed in the archives/ directory of the remote so that you
>> can confirm this.
>> 
>> How is the issue manifesting that you are seeing -- is it definitely
>> failing to retrieve the package in just one switch?  If this is the case,
>> then an issue on https://github.com/ocaml/opam/issues would be
>> appreciated, with details on `opam remote` so that we can see how
>> you are accessing the local package.
>> 
>> OPAM should support complete offline access (assuming that package
>> builds themselves do not depend on the network), so the model you
>> want should work with OPAM 1.2.2.
>> 
>> regards
>> Anil
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 


      reply	other threads:[~2016-10-04 16:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03 18:05 Arlen Cox
2016-10-04  9:55 ` Anil Madhavapeddy
2016-10-04 16:09   ` Arlen Cox
2016-10-04 16:17     ` Anil Madhavapeddy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5BF40816-67CA-428B-8A7A-7029825C75D7@recoil.org \
    --to=anil@recoil.org \
    --cc=arlencox@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).