On Thu, Feb 21, 2008 at 06:42:56PM +0100, David MENTRE wrote: > I few weeks ago, I asked about a bug on Ubuntu where an ocaml bytecode > executable was not working. In fact, it was the addition of an ELF > section that broke the binary. This bug should soon be fixed > (https://bugs.launchpad.net/ubuntu/+source/ocamlnet/+bug/180364). > > After that, one will need to rebuild all OCaml packages having > bytecode executables. Thus my question: is there a script somewhere > that could help me list all packages (I suppose I mean source > packages, right?) having bytecode executables, like ocamlnet for > ocamlrpcgen binary? Short answer: we don't have anything like that that I'm aware of. Long answer. The information you are looking for can not be extracted by simply looking at the package metadata, you will need to look into the package and at the actual files it ships. We have a list of OCaml related source packages [1] which you can restrict your research to. Starting from such a list, you will have to download all related binary packages and then start looking into executable files shipped by them. A quick and easy way to do that would be to use the Python "debfile" library which is shipped into the python-debian package (which, AFAIK, is also in Ubuntu). Now the question is how to detect the executables you are interested in, and I've no good answer for that. Non-custom OCaml bytecode executables can easily be found by checking if they have an ocamlrun shebang line. However, it seems they are not those you are interested in, which are custom bytecode executables. They are "ordinary" non-stripped ELF binaries, my best bet at recognizing them would be to use objdump and try to guess what would be a symbol name part of all custom bytecode executables. "caml_gc_full_major", "caml_enter_blocking_section", "caml_main" are probably good starting points, though I have not checked they forcibly appear in all the executables you are interested in. For an example you can try playing with: $ objdump -x /usr/bin/ocamlrpcgen | grep caml_ Cheers. [1] http://pkg-ocaml-maint.alioth.debian.org/ocaml_src_pkgs.txt -- Stefano Zacchiroli -*- PhD in Computer Science ............... now what? zack@{upsilon.cc,cs.unibo.it,debian.org} -<%>- http://upsilon.cc/zack/ (15:56:48) Zack: e la demo dema ? /\ All one has to do is hit the (15:57:15) Bac: no, la demo scema \/ right keys at the right time
Attachment:
signature.asc
Description: Digital signature