On Sat, Jan 15, 2022 at 10:13 PM Michel Alexandre Salim
<salimma(a)fedoraproject.org> wrote:
I reclaimed this, but I'll add you to the ACL.
Okay.
Looking forward to the updates! I plan on resuming work packaging
the
Infer dependencies, but likely won't have time to get back to Ocaml
packaging until after getting some work done for my CentOS Dojo talk
next month.
The updates are all in Rawhide. I've been working on the Infer
dependencies in a local repo, with the idea of working out all of the
kinks. I was thinking I would then create a COPR, and we could all
actually *use* Infer as an rpm installation from there while we work
on moving packages into Fedora a bit at a time.
Sadly, I've gotten stuck on core_kernel. It is not compatible with
OCaml 4.13. I've been trying to work out how to fix it, but haven't
succeeded yet.
I think the ocaml-octavius and ocaml-ppx-js-style packages are no
longer needed. If I confirm that, I will give them to anybody who
wants them, or retire them if nobody does.
Also, there is so much copied boilerplate between spec files that I
think it is time to make a few rpm macros. I'm thinking:
- %dune_build: analogous to %make_build, %cmake_build, etc. This macro would:
- Build the package with default flags. I suggest
`%{?_smp_mflags} --verbose`. Also pass `--release` if the user does
not give any `-p` arguments.
- Build @install by default, but allow the user to substitute other targets.
- If any stublibs are created, relink them with %{build_ldflags}.
It would be better to make ocamlmklib link with Fedora linker flags in
the first place.
- %dune_install: analogous to %make_install, %cmake_install, etc.
This macro would:
- Run `dune install --destdir=%{buildroot}`
- Remove any odoc markers (files named `.dune-keep` below
`_build/default/_doc/_html`)
- Remove the directory named `/usr/doc` in the buildroot
- Remove any `*.ml` files that have a matching `*.mli` file in the buildroot
- Write out a file containing the names of all installed files, so
we can write `%files -f <filename>`.
- %dune_check or %dune_test: analogous to %tox, etc.. This macro would:
- Run `dune runtest` (maybe `--verbose`)
- Pass `--release` if no `-p` arguments are given
We probably also want something that can parse ocamlbuild `*.install`
files, which we could use to make `%files -f` work for (some) non-dune
builds as well.
Finally, I believe I have discovered 2 rules for handling dependencies
between OCaml packages. They are:
- The BuildRequires match 1-to-1 with dependencies listed in the
package's opam file. (OCaml dependencies only, of course. Those that
interface with C libraries, for example, will have additional
dependencies.)
- The devel subpackage should have a Requires for each element of each
"requires =" field in the generated META file.
I've been able to follow those 2 rules all the way up to core_kernel
without needing to add any transitive OCaml BuildRequires to the spec
files.
--
Jerry James
http://www.jamezone.org/