* [Caml-list] Running an Opam Cache?
@ 2016-10-30 8:34 Christian Lindig
2016-10-31 18:25 ` Thomas Gazagnaire
0 siblings, 1 reply; 4+ messages in thread
From: Christian Lindig @ 2016-10-30 8:34 UTC (permalink / raw)
To: caml-list
Opam is the best way to install OCaml packages. By default it will download each package from the URL provided in a package and thus it relies on these being available over the internet. This entails a danger that they might not, or change (although the checksum provides some protection). Is there a way to setup an Opam repository locally such that an "opam install” would download (selected) sources from a local archive?
I understand that packages can be pinned locally using each package’s Git repo and this would work if each package also includes its opam files. I am looking for a way to populate the cache with the tar/zip files that the Opam packages point to.
— Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Running an Opam Cache?
2016-10-30 8:34 [Caml-list] Running an Opam Cache? Christian Lindig
@ 2016-10-31 18:25 ` Thomas Gazagnaire
2016-10-31 21:37 ` Hezekiah M. Carty
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gazagnaire @ 2016-10-31 18:25 UTC (permalink / raw)
To: Christian Lindig; +Cc: caml-list
> I understand that packages can be pinned locally using each package’s Git repo and this would work if each package also includes its opam files. I am looking for a way to populate the cache with the tar/zip files that the Opam packages point to.
There are various ways to do it, the easiest one would be to use `opam-admin`:
```
$ git clone https://github.com/ocaml/opam-repository
$ cd opam-repository
$ opam-admin make --resolve [an optional list of packages to limit the size of the cache]
$ opam remote add local-cache .
```
Best,
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Running an Opam Cache?
2016-10-31 18:25 ` Thomas Gazagnaire
@ 2016-10-31 21:37 ` Hezekiah M. Carty
2016-11-01 20:21 ` Thomas Gazagnaire
0 siblings, 1 reply; 4+ messages in thread
From: Hezekiah M. Carty @ 2016-10-31 21:37 UTC (permalink / raw)
To: Thomas Gazagnaire; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 914 bytes --]
On Mon, Oct 31, 2016 at 2:25 PM Thomas Gazagnaire <thomas@gazagnaire.org>
wrote:
> > I understand that packages can be pinned locally using each package’s
> Git repo and this would work if each package also includes its opam files.
> I am looking for a way to populate the cache with the tar/zip files that
> the Opam packages point to.
>
> There are various ways to do it, the easiest one would be to use
> `opam-admin`:
>
> ```
> $ git clone https://github.com/ocaml/opam-repository
> $ cd opam-repository
> $ opam-admin make --resolve [an optional list of packages to limit the
> size of the cache]
> $ opam remote add local-cache .
> ```
>
Is there an existing automated tool to do the same for compilers? Or just
download the source + edit the compilers/*/*/*.comp files by hand/script?
This will, I suspect, be simpler with opam 2.0 and compilers-as-packages.
Thanks,
Hez
[-- Attachment #2: Type: text/html, Size: 2437 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] Running an Opam Cache?
2016-10-31 21:37 ` Hezekiah M. Carty
@ 2016-11-01 20:21 ` Thomas Gazagnaire
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gazagnaire @ 2016-11-01 20:21 UTC (permalink / raw)
To: Hezekiah M. Carty; +Cc: caml-list
> Is there an existing automated tool to do the same for compilers? Or just download the source + edit the compilers/*/*/*.comp files by hand/script?
Unfortunately you indeed have to manually modify the .comp file.
> This will, I suspect, be simpler with opam 2.0 and compilers-as-packages.
Yes.
Best,
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-01 20:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-30 8:34 [Caml-list] Running an Opam Cache? Christian Lindig
2016-10-31 18:25 ` Thomas Gazagnaire
2016-10-31 21:37 ` Hezekiah M. Carty
2016-11-01 20:21 ` Thomas Gazagnaire
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox