Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.9 backported commits #4547

Merged
merged 30 commits into from
Jul 2, 2021
Merged

2.0.9 backported commits #4547

merged 30 commits into from
Jul 2, 2021

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Feb 12, 2021

Backported commits for the 2.0.9 release

Note: blocking setup-ocaml w/dune

Still to cherry-pick

Error free opam root loading

Sandbox

Lint

Internal

Package building

Build

Pin

Infrastructure

Test

@rjbou rjbou added this to the 2.0.9 milestone Feb 12, 2021
@rjbou rjbou mentioned this pull request Mar 10, 2021
@smorimoto
Copy link
Member

Need to replace some @ with #.

- - Fix sandbox script shell mistake that made PWD read-write on remove actions [@4589 @AltGr]
- - Port bwrap improvements to sandbox_exec [@4589 @AltGr]
+ - Fix sandbox script shell mistake that made PWD read-write on remove actions [#4589 @AltGr]
+ - Port bwrap improvements to sandbox_exec [#4589 @AltGr]

CHANGES Outdated Show resolved Hide resolved
@rjbou
Copy link
Collaborator Author

rjbou commented Mar 10, 2021

indeed, thanks!

@dra27
Copy link
Member

dra27 commented Mar 12, 2021

Linking in #4573

@smorimoto smorimoto mentioned this pull request Mar 29, 2021
4 tasks
@smorimoto
Copy link
Member

Can't we release 2.0.9 without #4573? There are some important changes for macOS and I hope to release 2.0.9 in May.

@dra27
Copy link
Member

dra27 commented May 5, 2021

We're trying to get the 2.1 release candidate out of the door, first - once that's done (which really should be any day now!), releasing 2.0.9 would be fine. It's not blocked on 4573, it was just linked to consider it.

The solutions to #4394 and #4636 both need to be back-ported to 2.0.x, although not necessarily to 2.0.9. See the milestone for more info.

@smorimoto
Copy link
Member

That sounds good. Thank you for the perfect explanation!

rjbou and others added 18 commits July 1, 2021 19:37
Signed-off-by: Sora Morimoto <sora@morimoto.io>
Signed-off-by: Sora Morimoto <sora@morimoto.io>

Co-Authored-By: Kate <kit.ty.kate@disroot.org>
The previous behaviour was to bind-mount $TMPDIR to /tmp within the sandbox, and
re-set TMPDIR accordingly ; however, this meant that absolute paths within
TMPDIR could be incompatible between the outside and the inside of the sandbox.

This became a visible problem with dune 2.8, which redefines TMPDIR to a
subdirectory (e.g. `/tmp/buildXXXX.dune`). If you happen to be running tests
with an OPAMROOT within $TMPDIR, your opam root will no longer be accessible,
and packages that run opam commands from within the sandbox (which is
discouraged, but well...) will break.

In our tests, run through dune, OPAMROOT gets created in
`/tmp/buildXXXX.dune/OPAM`, then packages get installed within a sandbox, this
is relocated to `/tmp/OPAM` but `OPAMROOT` and `OPAM_SWITCH_PREFIX` remained set
to below `/tmp/buildXXXX.dune`, and things broke.
this made PWD always rw accessible on remove actions, and was possibly dangerous
Part of Fix the sandbox check with the new layout
the latter is required by the former, and better stay consistent with the
compiler version used across arches.
@rjbou rjbou force-pushed the 209 branch 2 times, most recently from 3cfe557 to 68f87e7 Compare July 1, 2021 17:48
@rjbou
Copy link
Collaborator Author

rjbou commented Jul 1, 2021

Last update, rebased and commits squashed!

@smorimoto
Copy link
Member

Yay!

@dra27
Copy link
Member

dra27 commented Jul 2, 2021

src_ext/dune-opam-file-format needs to be nuked

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

A few warnings from OCaml which are worth eliminating (even on an LTS branch!)

src/format/opamFile.ml Outdated Show resolved Hide resolved
src/format/opamFile.ml Show resolved Hide resolved
src/format/opamFile.ml Outdated Show resolved Hide resolved
src/format/opamFile.ml Outdated Show resolved Hide resolved
src/format/opamFile.ml Outdated Show resolved Hide resolved
rjbou and others added 9 commits July 2, 2021 16:42
…mat version field `opam-version' from the opam root version.
They provide reading function that don't error are reading, do no show/stop at erros (unless strict mode is enabled)
permit read only loading, with best effort on file reading.
This is handled by function in `OpamStateConfig' that permit to load
state files: config, switch-config, switch-state, and repos-config.
The sentinel group of kind `#` is now processed correctly in
OpamFile.SyntaxFile. This allows, for example, opam 2.2 to use
opam-file-format 2.1 and still have `opam-version: "2.2"`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Opam 2.0.8] Creating local switch advises the --compiler option which doesn't exist
6 participants