[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [post-sarge] RFC: dh_ocaml



On Mon, Apr 04, 2005 at 09:23:36PM +0200, Stefano Zacchiroli wrote:
> [ This post covers post-sarge issue so don't waste your time reading it
>   if packages of yours are not yet ready for the 3.08.3 transition :-) ]
> 
> Hi all,
>   I started writing a debhelper for ocaml for automatic calculation of
> OCaml dependencies. You can find the state of the art in the SVN repo as
> tools/dh_ocaml/.
> 
> At the time of writing the debhelper should be invoked as dh_ocaml in
> debian/rules after the install target (e.g, just after
> dh_installchangelogs) and it does two different things:
> 
> 1) Handle the md5sums registry, that is:
>    a) Compute ocaml md5sums of units _defined_ in .cm[ao] shipped by the
>       package and create add a new file to the package being built. The
>       file is named /var/lib/ocaml/md5sums/<pkgname>.md5sums and is a
>       two columns table: md5sum, unit name
>    b) Add postinst and postrm scripts which keep up to date the registry
>       of ocaml md5sums located on the machine of people having installed
>       ocaml packages. The registry is located in
>       /var/lib/ocaml/md5sums/MD5SUMS and is a 4 columns table: md5sum,
>       package name, version, unit name. It can always be compute
>       starting from *.md5sums files and the version of the corresponding
>       package
> 
> 2) Compute dependencies of the package being built and fills the
>    substvar ${ocaml:Depends}, that is:
>    a) Compute ocaml md5sums of units _imported_ by .cm[ao] shipped by
>       the package. For each of them look them up in the registry and if
>       a match is found adds a versioned entry to the substvar above
> 
> Since dh_ocaml is not yet part of debhelper, in order to test it you can
> "make" in the dh_ocaml/ dir. The outcome should be a version of the
> debhelper package rebuilt so that it ships dh_ocaml and the needed
> autoscripts.
> 
> A lot of things still needs to be done, this is an excerpt from the TODO
> lines of dh_ocaml:
> 
>   # TODO ask Joey Hess about how much dh_ocaml follows debhelper
>   #      guidelines
>   # TODO check how dh_ocaml work when multiple binary packages are being
>   #      built
>   # TODO for libraries: add proper dependencies on ocaml (and findlib?)
>   # TODO for binaries: check if package is shipping any bytecode
>   #      binaries (head -1 should be enough) and add proper dependencies
>   #      on ocaml
>   # TODO complete POD documentation
>   # TODO add comment headers for uncommented subs
>   # TODO check if dh_ocaml md5sums calculcation works with -pack -ed
>   #      units (e.g.  Foo.Bar)
> 
> Comments are welcome.
> 

Yes i have a comment : take a look at 
http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/projects/dh-make-ocaml/trunk/debhelper/?rev=0&sc=0

I have started to write a things that look likes very much the same
thing. I don't have time to continue the work, but it was beginning to
work. Maybe we could merge the two project ?

Kind regard
Sylvain Le Gall

ps : it is based on the idea of tofubar.ml ( do you remember ;-) ).



Reply to: