caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Offline opam
@ 2016-10-03 18:05 Arlen Cox
  2016-10-04  9:55 ` Anil Madhavapeddy
  0 siblings, 1 reply; 4+ messages in thread
From: Arlen Cox @ 2016-10-03 18:05 UTC (permalink / raw)
  To: caml-list

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.

Thanks,
Arlen

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

* Re: [Caml-list] Offline opam
  2016-10-03 18:05 [Caml-list] Offline opam Arlen Cox
@ 2016-10-04  9:55 ` Anil Madhavapeddy
  2016-10-04 16:09   ` Arlen Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Anil Madhavapeddy @ 2016-10-04  9:55 UTC (permalink / raw)
  To: Arlen Cox; +Cc: caml-list

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

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

* Re: [Caml-list] Offline opam
  2016-10-04  9:55 ` Anil Madhavapeddy
@ 2016-10-04 16:09   ` Arlen Cox
  2016-10-04 16:17     ` Anil Madhavapeddy
  0 siblings, 1 reply; 4+ messages in thread
From: Arlen Cox @ 2016-10-04 16:09 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: caml-list

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

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

* Re: [Caml-list] Offline opam
  2016-10-04 16:09   ` Arlen Cox
@ 2016-10-04 16:17     ` Anil Madhavapeddy
  0 siblings, 0 replies; 4+ messages in thread
From: Anil Madhavapeddy @ 2016-10-04 16:17 UTC (permalink / raw)
  To: Arlen Cox; +Cc: caml-list

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
> 


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-03 18:05 [Caml-list] Offline opam Arlen Cox
2016-10-04  9:55 ` Anil Madhavapeddy
2016-10-04 16:09   ` Arlen Cox
2016-10-04 16:17     ` Anil Madhavapeddy

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).