Date: Sat, 3 Aug 2013 03:00:04 +0100 From: Gabor Pali <pgj@FreeBSD.org> To: Michael <michipili@gmail.com> Cc: marino@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Ocaml ports needs love Message-ID: <CAHnG2CxyvF5vn4RP%2B65ECfEcBBum4Z2AP6ZFiiDh5s9Nv7ND8Q@mail.gmail.com> In-Reply-To: <51FAD121.4060104@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> <51FAD121.4060104@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 1, 2013 at 10:20 PM, Michael <michipili@gmail.com> wrote: > 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: I am fully aware of all the issues you have summarized as I have been maintaining the Haskell Cabal ports for the last 4-5 years, whose number in the ports tree slowly exceeds 400 these days :-) > 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} OPAM only has an "install" subcommand which is the build and the install phase together. On the other hand, I do not think that OPAM could work with standalone packages. It has to have a package index where it stores all the metadata (i.e. the OPAM package and compiler descriptions), but packages are still served via the regular OCaml build solutions, such as OASIS. As I wrote in my previous mail, OPAM is much like the reincarnation of the ports tree itself in OCaml land. > =97 OPAM manages its =93own file hierarchy=94 and does not install binari= es > and so on at the regular places (I only glimpsed at this, tough). It puts binaries under its own ".opam" state directory, depending on which compiler is used. Note that because OPAM supports using multiple different OCaml compilers (and switching between them), personally I see it hard (if not impossible) to integrate with the practices of the FreeBSD ports. > A quick fix for this could be to have a dedicated installation, say > something like =93OPAMROOT=3D/usr/local/opam=94 and adding the relevant > locations to the path (binaries and dll). OPAM uses the "config env" subcommand to set all the relevant environment variables for the currently used compiler toolchain, like it sets the PATH each time, so the corresponding binaries are used to build the packages. Bringing this to the level of the system (i.e. prepend the OPAM directories to the system-level PATH value) might not be the best solution. Note that what FreeBSD ports would require is actually the build "recipe", most of the other things can be then derived. So, we could utilize the OPAM package descriptions to generate FreeBSD ports but not OPAM itself. > =97 OPAM does not distinguish between build and install while FreeBSD > ports do. Yes, it does not, see above. > 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. OPAM is indeed missing the separate "install" target in its package description. I have not managed yet to learn why this design choice was made... > =97 We need to generate pkg-plist or extract an installation script or an= y > similar information from an OPAM package. > > =97 We need to extract tarball location, dependancy information and > descriptions from OPAM packages. Been there, done that. For the Haskell Cabal ports, I have such a tool, called hsporter [1] (which can also help with updating, by the way). > BTW I have a port for ocaml-4.00.1 (PR ports/173364) which still has a > small issue =97 because other ports install docs in > '/usr/local/share/doc/ocaml' , the directory will not be cleanly > removed. What ports? Other OCam ports (that depend on lang/ocaml)? Have you tried @dirrmtry instead of @dirrm in the pkg-plist? [1] https://github.com/freebsd-haskell/hsporter
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHnG2CxyvF5vn4RP%2B65ECfEcBBum4Z2AP6ZFiiDh5s9Nv7ND8Q>