[opam-devel] opam binary snapshot

Jon Ludlam jonathan.ludlam at eu.citrix.com
Thu Oct 31 13:24:34 GMT 2013


On 31/10/13 12:40, Anil Madhavapeddy wrote:
> On 15 Oct 2013, at 00:36, Mika Illouz <mika at illouz.net> wrote:
>
>> Our current system involves packaging up OCaml stuff as
>> debian packages, and distributing them to ubuntu clients in binary
>> form via a internal debian repo.  This gets the ocaml dependencies
>> necessary to build stuff, even to those don't develop in ocaml, with
>> minimal cognitive overload.  
>>
>> Some of my colleagues think that distributing ocaml dependencies in
>> binary form is ultimately more stable.  I am wondering whether I can
>> satisfy them, with a solution that somehow exports as binary snapshot
>> of everything under ~/.opam/4.01/  .  One idea is to define a debian
>> package for a blessed ~/.opam/4.01/ , and export it via our internal
>> debian repo.  Another idea is just export it to clients via rsync, or
>> some other shared global storage. 
> [Ccing opam-devel and also Citrix/Rackspace folk, as this came up
> last week in XenSummit).
>
> In general, I'd like to figure out how to use OPAM to build RPMs and
> Debs just as easily as it can currently do ocamlfind installations.
> In the short-term, I suspect that if you use a system compiler and
> have enough external dependency information in the OPAM repository,
> we could get away with quite a lot by tarring up the .opam directory.
>
> This has also been a frequent request for teaching purposes, so I'd
> like to experiment with version controlling .opam -- this would just
> require hooks when adding/creating files in the subdirectory hierarchy,
> although it would probably be too slow to shell out every time
> (Thomas' cagit OCaml library may come in useful here).
>
> Dave/Jon/John, any thoughts on this?
>
> -anil

RPMs/debs would definitely be nice. There would be a problem doing this
right now as you'd have to do some sort of two pass thing to get the
list of files installed by the package, which is required for both RPMs
and debs.

One slightly odd thing about tarring up the .opam directory is that it's
usually something that lives in a user's home directory. I wonder if any
of the packages might have hard-coded paths in there which would mean
having to install it into exactly the same place - so requiring the same
user. I guess a quick grep through the .opam dir would tell you this.

Jon




More information about the opam-devel mailing list