Dear GHC maintainers, 1105 Haskell packages (all Haskell packages?) install one or more files in /var/lib/ghc/package.conf.d/. Would it be possible to change the way these packages are built, so that they do not ship any files under /var, a directory meant to "[contain] _variable_ data files" (FHS)? Regards,
Kari, can you give us some insight about why they were moved to /var in the first place?
Hi Kari, gentle ping. :) From conversations in IRC it seems that it would be easy to move these files away from /var, but what is missing is to understand (Chesterton's Fence-like) for which historical reasons these files are installed there. Kind regards,
Hi, Le 16/04/2026 à 13:20, Gioele Barabucci a écrit : I guess the same applies to OCaml packages... And (as far as OCaml is concerned), I am partly responsible. Back in 2008, at the time of introduction of dh-ocaml, I must admit I didn't question the choice of location of /var/lib/ocaml nor did I have a strong opinion on where they should have been. Now is different :-) Adding debian-ocaml-maint@l.d.o to CC, so that maybe someone with the proper recollection can add insight. Cheers,
Hi Stéphane, Should I open a new bug for OCaml and add there some OCaml-specific data? Or do you (Haskell and OCaml dev) think that is makes more sense to try to seek a common solution (location, at least) for both languages? Truth be told, the kind of information that OCaml packages store in `/var/lib/ocaml/` strikes me as very different from what Haskell/GHC packages store in `/var/lib/ghc/package.conf.d/`. But I'm just a bystander. :)
Le 17/04/2026 à 15:13, Gioele Barabucci a écrit : After an exchange with my coauthors (and thinking), /var/lib/dpkg/info might have been an inspiration for the choice of /var/lib/ocaml in the first place... It may. /var/lib/ocaml currently contains static data, computed at build time over build artifacts, that are used to easy the work of dh_ocaml (and lintian). It is similar in spirit to dune-package files that exist outside Debian (and are installed in /usr/lib). What would be the canonical location for that? I'm thinking about "$(ocamlc -where)/.dh-ocaml" (aka "/usr/lib/$arch/ocaml/.dh-ocaml"), or spreading each package's data in each package's dir in /usr/lib, e.g. "$(ocamlc -where)/$pkg/.dh-ocaml". Any opinions? I just had a look. Actually, the data in /var/lib/ghc/package.conf.d makes me think of dune-package files (which are built by upstream toolchain, but not everyone uses dune). All in all, in OCaml world, the difference between /usr/lib and /var/lib is: /usr/lib is built by upstream toolchain, and /var/lib is built by Debian toolchain. The distinction made sense back at the time, but I'm no longer convinced now. Any thoughts? Cheers,
May I suggest a third option: `/usr/lib/$arch/dh-ocaml/$pkg/`? A hidden directory in /usr/lib sounds... problematic? (for the lack of a better word). Also dh-ocaml is related to ocaml, but is not ocaml. Debian's Ruby uses `/usr/lib/$arch/rubygems-integration/$api-ver/gems/$pkg`. Also, dh-ocaml is not the only program using the information in these files, lintian uses it as well. Perhaps something more generic like `/usr/lib/$arch/ocaml-integration/$pkg/` and `/usr/lib/$arch/ghc-integration/$pkg/`? Regards,