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

Re: debian ocaml packaging policy :: findlib->site-lib



> > > Can you please explain why you think it should be written in the
> > > debian ocaml policy?
> >
> > Because how findlib is configure affects how are installed a lot of
> > packages.
>
> No, not really. What affects where OCaml libraries are installed in a
> Debian system is the OCaml standard library directory, which is
> specified in Section 1.3.2 of the Debian OCaml policy; quoting:
>
>   The root of all installed OCaml libraries is the OCaml standard
>   library directory, which is /usr/lib/ocaml/VERSION/, at the time of
>   writing /usr/lib/ocaml/3.10.2. This location can be obtained from
>   the OCaml compiler by invoking it as ocamlc -where.
>
> Then, it just happens that packages installed under that dir are
> (mostly, possibly all) accessible via findlib, but that is not related
> to where packages are installed. In fact, using findlib you are
> completely agnostic about where files are installed.

You are misunderstanding what I am talking about.
The issue is not to know what `ocamlc -where` is bound to,
first I don't need to know that at all, all I need is to know is that it is 
`ocamlc -where` and nothing more,
second if I was willing to know that, it is written in the policy.


> > > findlib is an abstraction layer which precisely enable users to not
> > > knowing details like this one.
> >
> > Please don't forget that everyone is not a findlib user !
> > There are people that prefer to use the direct interface.
> > For these people, knowing the path of the directory where a lib is
> > installed is important. In the Makefile one will write -I +foo or -I
> > +site-lib/foo
>
> Sure, and I'm not assuming that everybody is using findlib at all. In
> fact, by default most library when one invokes "make install" (or the
> equivalent) try to install themselves under a sub-directory of `ocamlc
> -where`, and we are not changing that.

This is not true.

if the ./configure of findlib is passed the parameter -sitelib `ocamlc -where` 
(or equivalent), then all the libs installed with findlib will be installed 
in :
   `ocamlc -where`/somelib/

if you don't provide this parameter, then all the libs installed with findlib 
will be installed in :
   `ocamlc -where`/site-lib/somelib/

This won't affect findlib users. But users that don't use findlib will need to 
know the path (I don't mean the path of `ocamlc -where` but the path 
provided for -sitelib in the ./configure).
In one case a non-findlib user will have to use -I +site-lib/somelib/
OR -I +somelib/


>        , and we are not changing that.

you do provide the -sitelib parameter to the configure, so this is not the 
default, so you do are changing something.


> We are just implicitly recasting the "/usr/local/lib/ocaml/..." path
> which you would get from a legacy OCaml to the "/usr/lib/ocaml/..." to
> comply with FHS.

Again, I really don't care about what `ocamlc -where` is bound to.
You are misunderstanding there.
Sorry if I was not clear, I hope it will be now.

> > > Moreover, the findlib configuration in Debian is precisely tuned
> > > to work properly both with libraries shipped as Debian packages
> > > and library "manually" installed by local administrators (the
> > > latter end up under /usr/local/...).
> >
> > And this point depends on the current configuration of findlib.
> > Moreover, as you do it, why don't tell in the policy that you do it ?
>
> Policy is about the libraries packaged as official Debian
> packages. That libraries are only interested in the "/usr/lib/..."
> path which _is_ reported in the policy as I discussed above.

this is half of the path, the policy tells nothing about the 
.../site-lib/... part that was removed from the default path


> The "/usr/local/lib/..." path is of no interest for official packages
> and, IMO, is just a configuration detail of findlib.  Also, please
> remember that ocamlfind.conf is a configuration file, which admins are
> free to change as they see fit.

a linux user can always customise everything, but packagers still have to try 
to configure things well

> > For example, to search the configuration of debian findlib I have
> > searched for the build script of the ocaml packages, and felt there :
>
> You should have just looked at /etc/ocamlfind.conf, because that
> setting is a *runtime* setting of ocamlfind, rather than a build-time
> one.

Discussing about what I can customise as the personal admin of my system is 
not the point I am currently interested in.
What I am insterested in is to help providing good packages for Mandriva 
users, which users can use without needing to customise these.

>      Once more, if you want we can mention this in the policy, but
> once more this is specific of a single package.

This is not specific to a single package.
A lot of packages are concerned.

Let's take a concrete example.
Imagine some software that uses xml-light.
The author writes his software on Debian, and in his Makefile he writes
 -I +xml-light
Then a student which is an early beginner with ocaml on Mandriva downloads 
this software, and trys to run `make` but it just does not work,
and the poor student does not know why.
What he should do is to replace the path in the Makefile for:
 -I +site-lib/xml-light

A good idea would probably be that the different Linux distros align them 
about this. And this was what Mandriva chose to do. Mandriva packagers chose 
to align on Debian. So they did use the default `ocamlc -where`/site-lib 
thinking that this was what Debian was doing. But Debian don't use this path, 
it uses `ocamlc -where`.
So why this mistake ?
- because it was not clear ! It is written nowhere !
And now the poor student has to rewrite the Makefiles :-)

Well this will be corrected in the next Mandriva release, but maybe it could 
still help another Linux distro to get this information.

-- 
Regards
Florent


Reply to: