Cross compilation: Also generate 'prefix'/'prefixexec' sections for installation#14600
Cross compilation: Also generate 'prefix'/'prefixexec' sections for installation#14600WardBrian wants to merge 1 commit into
Conversation
…install files Signed-off-by: Brian Ward <bward@flatironinstitute.org>
75f8ebd to
c1c5272
Compare
|
I'm less sure about duplicating install entries, why not move entirely to the new sections? AFAIK it will be |
In, e.g., opam-cross-windows, this was not true. As a work around, @kit-ty-kate recommended using dune install instead, but this required editing most of our opam files and some ugly hacks like actually deleting the generated .install file (which I don’t entirely understand, but was willing to accept as a hotfix) It would be reasonable to remove the old generation after opam is released, but it’s also harmless to leave for compatibility IMO |
|
Are we OK with dropping support for older versions of opam here? @toots can you comment on this feature? |
To be clear, this PR does not currently drop support for older versions of |
toots
left a comment
There was a problem hiding this comment.
The approach is sound and with a wide backward compatibility. Thanks for working on this on both fronts @WardBrian
I did not know that. Thanks for letting me know. However, I still think this change is essentially breaking? If we stop generating the |
We don't stop generating them, which is the trick. Assuming ocaml/opam#6938 is accepted before opam 2.6 is released, the only version of opam which won't accept anything in these files is 2.5.1, the current release |
|
The other open question is if we'd like to support |
Would close #14393. Relies on ocaml/opam#6938
In summary:
Opam 2.5.1+ will ignore any target in an
.installfile that starts with../, which was previously used by dune's-xto place files in the<prefix>/<target>-sysrootdirectory.To allow for this use case while preserving the security benefits of disallowing parent access, opam is considering adding
prefixandprefixexecto the .install file syntax, which I have implemented in ocaml/opam#6938This PR updates dune to generate the new
prefixandprefixexecsections in addition to the../..used before. Why both? Because of the way that opam ignores things, this means that the same generated .install files would be compatibile with any opam besides 2.5.1