Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Aug 2013 23:20:33 +0200
From:      Michael <michipili@gmail.com>
To:        Gabor Pali <pgj@FreeBSD.org>
Cc:        marino@freebsd.org, freebsd-ports@freebsd.org
Subject:   Re: Ocaml ports needs love
Message-ID:  <51FAD121.4060104@gmail.com>
In-Reply-To: <CAHnG2CxEU2J2rtVLzGptbgNaUqDSAQ8LGHXRN2%2BQT0Gw-NE=-g@mail.gmail.com>
References:  <CAGFTUwMu9uEX9JxAqZTD7KUNAVqxXZUkjP1S6mn8HV6RVGh4UA@mail.gmail.com>	<20130227132633.GI16178@ithaqua.etoilebsd.net>	<51C9E5A4.2060502@gmail.com>	<CAHnG2Cwv5s4f4e1yVYPb8iwjOOpkVcYqhqzFhQW_v%2BhmW8ELAQ@mail.gmail.com>	<51F51F99.6080502@gmail.com>	<51F5226B.4030206@marino.st>	<CAHnG2CwTwPnTd8YujkxXsXoxR2%2B5HNq-q24GSNPVUC2et_Bf2Q@mail.gmail.com>	<51F809D5.80705@gmail.com>	<CAHnG2CwCC6CX60%2BQYnG18v8JPvy=wkUEbUMjY9rKnciqm6Y1Tg@mail.gmail.com>	<51F94BA6.5020308@gmail.com> <CAHnG2CxEU2J2rtVLzGptbgNaUqDSAQ8LGHXRN2%2BQT0Gw-NE=-g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Gabor Pali schrieb:
> On Wed, Jul 31, 2013 at 6:38 PM, Michael <michipili@gmail.com> wrote:
>> The ideal
>> thing would be to have a `opam make-freebsd-port OPAMPACKAGE' subcommand
>> that would prepare a nice Makefile, pkg-descr, pkg-plist triad, ready to
>> plug in the ports hierarchy.
> In summary, I have a vague feeling that OPAM-managed packages can be
> maintained quite well without the help of the FreeBSD Ports
> Collection. We may want to offer pre-built FreeBSD binaries for some
> of the leaf ports (e.g. net/unison), though.
You are right, and for people *working* with OCaml, the situation seems
indeed quite tolerable.

But from the standpoint of a system administrator having two sets A and
B of software packages managed by two different tools has a lot of
drawbacks:
— dependances between packages in A and B are not managed;
— software upgrade is a 2-steps process: upgrade software in A then in B;
— you eventually have to learn two package managers, not just one.
This is not what the port collection is for, since it aims at providing
a standard and unified way to deal with 3rd party software.

Therefore, while the pressure is low, it would be nicer to be able to
capsulate each opam package in a port. I picture myself something like
having an opam.bsd.mk makefile delegating all its work to opam, as in:

do-build:
    ${CD} ${WRKSRC} opam build ${OPAMPACKAGENAME}

and so on for each relevant sub-target. There are several issues to deal
with:

— OPAM manages its “own file hierarchy” and does not install binaries
and so on at the regular places (I only glimpsed at this, tough).

    A quick fix for this could be to have a dedicated installation, say
something like “OPAMROOT=/usr/local/opam” and adding the relevant
locations to the path (binaries and dll).

— OPAM does not distinguish between build and install while FreeBSD
ports do.

    I think this is mostly a security issue: building does not require
elevated privileges, only installing does. To support this separation,
we would need to tweak OPAM for FreeBSD.

— We need to generate pkg-plist or extract an installation script or any
similar information from an OPAM package.

— We need to extract tarball location, dependancy information and
descriptions from OPAM packages.

This looks like a lot of things to do.  If you have comments,
suggestions, etc… just feel free.

BTW I have a port for ocaml-4.00.1 (PR ports/173364) which still has a
small issue — because other ports install docs in
'/usr/local/share/doc/ocaml' , the directory will not  be cleanly
removed.  If you want to play with this port, please feel free!

Best regards,
Michael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51FAD121.4060104>