Skip to content

Re-allow .install files containing '..' - #7008

Merged
kit-ty-kate merged 3 commits into
ocaml:masterfrom
kit-ty-kate:revert-6897
Jul 17, 2026
Merged

Re-allow .install files containing '..'#7008
kit-ty-kate merged 3 commits into
ocaml:masterfrom
kit-ty-kate:revert-6897

Conversation

@kit-ty-kate

@kit-ty-kate kit-ty-kate commented Jul 7, 2026

Copy link
Copy Markdown
Member

Partially reverts ae877c0 (from #6879)

This check is no longer necessary since d7f7d8e (#7005) and broke opam repositories providing cross-compiled packages as such format is used by dune (see ocaml/dune#14393)

See https://ocaml.zulipchat.com/#narrow/channel/527832-opam/topic/Cross.20compilation.20with.20opam.202.2E5.2E1/with/592359165

Backported to 2.5 in #7009

@rjbou rjbou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think it is better to avoid having links, especially non permanent ones on commit messages. If the message is deleted, or the zulip is no longer online, it is not possible to find out the origin that you wanted to highlight.

@rjbou rjbou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if it wasn't enforced in the code, from the manual, .. are forbidden in .install target.
My opinion: I'm in favor or removing it (keep as is), especially as there is now a field that permit to no longer need them (#6938). For backward compatibility, we can reintroduce it, but discourage its use with a warning (that errors on strict mode). We can even think about removing the support in a few releases (we need then to give the information from now on release blog posts).

@kit-ty-kate

kit-ty-kate commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

Per #7009 (comment), that backward compatibility is required for 2.6 at least (then we can bring back the stricter rule in 2.7)

@kit-ty-kate kit-ty-kate mentioned this pull request Jul 17, 2026
1 task
@rjbou
rjbou force-pushed the revert-6897 branch 2 times, most recently from dd2ecf4 to 85706ef Compare July 17, 2026 18:40

@rjbou rjbou left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've update the code :

  • rebased
  • rebase on top of 7015
  • added a warning (error on strict mode) for .. in target
  • added a test with strict mode to highlight the error

kit-ty-kate and others added 3 commits July 17, 2026 20:13
…tination filepath trying to escape their scope
Partially reverts ae877c0

This check is no longer necessary since d7f7d8e
and broke opam repositories providing cross-compiled packages

A warning is displayed in case of '..' and it errors on strict mode
@kit-ty-kate

Copy link
Copy Markdown
Member Author

Ignoring the missing macOS runs. Seems like GitHub have nuked their macOS machines out of existence

@kit-ty-kate
kit-ty-kate merged commit 5da674f into ocaml:master Jul 17, 2026
37 of 41 checks passed
@kit-ty-kate
kit-ty-kate deleted the revert-6897 branch July 17, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants