[Fedora-packaging] Meaning of -devel

Richard W.M. Jones rjones at redhat.com
Fri May 25 21:10:12 UTC 2007


Toshio Kuratomi wrote:
> On Fri, 2007-05-25 at 20:21 +0100, Richard W.M. Jones wrote:
>> Tom "spot" Callaway wrote:
>>> Here's the rule of thumb I've always used:
>>>
>>> In the traditional library/binary model:
>>>
>>> The main package is for libraries and components that another binary
>>> would need to execute. I can't _run_ foo without libbar.so.6 being
>>> present.
>>>
>>> The -devel package is for headers and components that are needed to
>>> build that binary. I can't _build_ foo without bar.h being present.
>>>
>>> So, in the OCaml universe, I'd say those .cma files fall into the main
>>> package, as I can't run _foo_ without those .cma files present.
>> In fact because OCaml binaries are statically linked to OCaml libraries 
>> foo doesn't require anything to run.
>>
>> The *.cma file is a bit more like a *.a file, but as ever the parallels 
>> aren't precise.
>>
> You have an interesting case here.  Like spot, I lean towards the *.cma
> files being available from the main (non-devel) package as the toplevel
> and interpreted OCaml scripts won't run without them.  They are loadable
> modules in this sense.

Of course I'd completely forgotten about OCaml scripts ...  They're not 
used very often, but they are an argument for putting the *.cma and 
*.cmi files into the main package.

Here's an example of an OCaml script, albeit one which in this case 
doesn't use any external libraries (but in general they can do):

http://en.wikipedia.org/wiki/Objective_CAML#Birthday_paradox

> The fact that they are also included statically in compiled OCaml
> programs seems to be a red herring for this decision but I'm sure their
> dual nature will raise other interesting issues later.

After playing around with strace, I'm pretty sure that it's safe just to 
put the *.cma, *.cmi and *.so files (if present) into the main package, 
to get the toplevel and scripts working.

That is what I did in these spec files:

http://annexia.org/tmp/ocaml-extlib.spec
[https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240655]
http://annexia.org/tmp/ocaml-calendar.spec
[https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240571]
http://annexia.org/tmp/ocaml-pcre.spec
[https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240652]

Rich.

-- 
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20070525/3e7b8219/attachment.bin>


More information about the Fedora-packaging mailing list