Discussion:
Questions Regarding Debian OCaml Packaging and FHS Compliance for Shared Files
(too old to reply)
Bo YU
2024-09-20 17:50:01 UTC
Permalink
Hi team,

I have one question need to help to understand.

Do we have one OCaaml package as an example to build some binary files
that need to be installed under `/usr/share/ocaml/` dir?

The reason for asking this question is that I have one package(lem)
which generated some binary files as I said above. If I install `lem`
via opam, we can get some files like:

```
...
/home/vimer/.opam/default/share/lem
/home/vimer/.opam/default/share/lem/coq-lib
/home/vimer/.opam/default/share/lem/coq-lib/coq_makefile.in
/home/vimer/.opam/default/share/lem/coq-lib/coqharness.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_assert_extra.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_assert_extra_auxiliary.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_basic_classes.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_basic_classes_auxiliary.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_bool.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_bool_auxiliary.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_debug.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_debug_auxiliary.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_either.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_either_auxiliary.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_function.v
/home/vimer/.opam/default/share/lem/coq-lib/lem_function_auxiliary.v
...
/home/vimer/.opam/default/share/lem/library/show.lem
/home/vimer/.opam/default/share/lem/library/show_extra.lem
/home/vimer/.opam/default/share/lem/library/sorting.lem
/home/vimer/.opam/default/share/lem/library/string.lem
/home/vimer/.opam/default/share/lem/library/string_extra.lem
/home/vimer/.opam/default/share/lem/library/transform.lem
/home/vimer/.opam/default/share/lem/library/tuple.lem
/home/vimer/.opam/default/share/lem/library/word.lem
```

So I wonder if we have Debian OCaml rule to obey FHS. Certainly, the
directory we put should be callee by `$(shell ocamlfind query lem)`
command.

TIA.

BR,
Bo
Bo YU
2024-09-25 14:50:02 UTC
Permalink
Hi,
Post by Bo YU
Hi team,
I have one question need to help to understand.
Do we have one OCaaml package as an example to build some binary files
that need to be installed under `/usr/share/ocaml/` dir?
The reason for asking this question is that I have one package(lem)
which generated some binary files as I said above. If I install `lem`
```
...
/home/vimer/.opam/default/share/lem/library/word.lem
```
So I wonder if we have Debian OCaml rule to obey FHS. Certainly, the
directory we put should be callee by `$(shell ocamlfind query lem)`
command.
In the past two days I am thinking the question.

I would like to put these share files into `/usr/share/ocaml/lem`
unless there is a better suggestion. Is that okay?

BR,
Bo
Post by Bo YU
TIA.
BR,
Bo
Bo YU
2024-09-27 09:50:01 UTC
Permalink
Hi,
Hi,
Post by Bo YU
I would like to put these share files into `/usr/share/ocaml/lem`
unless there is a better suggestion. Is that okay?
Why not directly /usr/share/lem? Are these files of any use outside of
lem, but inside the OCaml ecosystem?
Good point! I misunderstood at first, but you're right. Initially, I
misunderstood that all shared files from OCaml-related packages should
be put `/usr/share/ocaml/`: if these share files was only used under
OCaml namespace, the hypothesis is valid. If only as a separated
package, in generally we put these files into /usr/share/$(package).
this is today I learn.

But for lem, maybe it hits exactly what you're talking about.
linksem[0] will use these share files, this is in line with the lem
upstream design[1], I'm not sure if there are other non-OCaml related
packages that use these files. So these files under share/ of lem were
used with OCaml ecosystem package at least by now.If I understand
correctly, we should choose to use `/usr/share/ocaml/lem` for lem.

Please correct me if I am wrong.

Thanks for the your help and time again!

[0]: https://salsa.debian.org/ocaml-team/linksem/-/blob/debian/main/debian/rules?ref_type=heads#L11
[1]: https://github.com/rems-project/lem?tab=readme-ov-file#without-opam
Cheers,
--
Stéphane
Bo YU
2024-10-05 00:10:01 UTC
Permalink
Hi Stéphane,
Post by Bo YU
Hi,
Hi,
Post by Bo YU
I would like to put these share files into `/usr/share/ocaml/lem`
unless there is a better suggestion. Is that okay?
Why not directly /usr/share/lem? Are these files of any use outside of
lem, but inside the OCaml ecosystem?
Good point! I misunderstood at first, but you're right. Initially, I
misunderstood that all shared files from OCaml-related packages should
be put `/usr/share/ocaml/`: if these share files was only used under
OCaml namespace, the hypothesis is valid. If only as a separated
package, in generally we put these files into /usr/share/$(package).
this is today I learn.
But for lem, maybe it hits exactly what you're talking about.
linksem[0] will use these share files, this is in line with the lem
upstream design[1], I'm not sure if there are other non-OCaml related
packages that use these files. So these files under share/ of lem were
used with OCaml ecosystem package at least by now.If I understand
correctly, we should choose to use `/usr/share/ocaml/lem` for lem.
Please correct me if I am wrong.
Could you help me to evaluate that again, did I misunderstand what you
meant? I have tested it on its rdeps, even these share files are put
`/usr/share/lem` is okay.

Once we decide, we can upload his reverse dependencies.

Thanks for your time again.

BR,
Bo
Post by Bo YU
Thanks for the your help and time again!
[0]: https://salsa.debian.org/ocaml-team/linksem/-/blob/debian/main/debian/rules?ref_type=heads#L11
[1]: https://github.com/rems-project/lem?tab=readme-ov-file#without-opam
Cheers,
--
Stéphane
Bo YU
2024-10-08 08:00:02 UTC
Permalink
Hi,

On Tue, Oct 8, 2024 at 2:55 PM Stéphane Glondu <***@debian.org> wrote:
...
Post by Bo YU
Could you help me to evaluate that again, did I misunderstand what you
meant? I have tested it on its rdeps, even these share files are put
`/usr/share/lem` is okay.
There seems to be no established practice of using `/usr/share/ocaml`.
At the moment, there seems to be only files related to the toolchain
itself there.
IMHO, `/usr/share/lem` should be used instead.
Okay, I agree with this also after thinking about it for a few days.

Thanks for confirming this again!

BR,
Bo
Cheers,
--
Stéphane
Loading...