|
| 1 | +--- a/src/client/opamCommands.ml |
| 2 | ++++ b/src/client/opamCommands.ml |
| 3 | +@@ -125,7 +125,7 @@ |
| 4 | + |
| 5 | + let get_init_config ~no_sandboxing ~no_default_config_file ~add_config_file = |
| 6 | + let builtin_config = |
| 7 | +- OpamInitDefaults.init_config ~sandboxing:(not no_sandboxing) () |
| 8 | ++ OpamInitDefaults.init_config ~sandboxing:false () |
| 9 | + in |
| 10 | + let config_files = |
| 11 | + (if no_default_config_file then [] |
| 12 | +@@ -350,6 +350,7 @@ |
| 13 | + cygwin_internal cygwin_location cygwin_extra_packages |
| 14 | + git_location no_git_location |
| 15 | + () = |
| 16 | ++ let no_sandboxing = true in |
| 17 | + apply_global_options cli global_options; |
| 18 | + apply_build_options cli build_options; |
| 19 | + (* If show option is set, dump opamrc and exit *) |
| 20 | +--- a/src/client/opamInitDefaults.ml |
| 21 | ++++ b/src/client/opamInitDefaults.ml |
| 22 | +@@ -139,16 +139,17 @@ |
| 23 | + "rsync"; |
| 24 | + ] |> List.map OpamSysPkg.of_string |
| 25 | + |
| 26 | +-let init_scripts () = [ |
| 27 | +- ("sandbox.sh", OpamScript.bwrap), Some bwrap_filter; |
| 28 | +- ("sandbox.sh", OpamScript.sandbox_exec), Some macos_filter; |
| 29 | +-] |
| 30 | ++let init_scripts ~sandboxing () = |
| 31 | ++ if sandboxing then [ |
| 32 | ++ ("sandbox.sh", OpamScript.bwrap), Some bwrap_filter; |
| 33 | ++ ("sandbox.sh", OpamScript.sandbox_exec), Some macos_filter; |
| 34 | ++ ] else [] |
| 35 | + |
| 36 | + module I = OpamFile.InitConfig |
| 37 | + |
| 38 | + let (@|) g f = OpamStd.Op.(g @* f) () |
| 39 | + |
| 40 | +-let init_config ?(sandboxing=true) () = |
| 41 | ++let init_config ?(sandboxing=false) () = |
| 42 | + I.empty |> |
| 43 | + I.with_repositories |
| 44 | + [OpamRepositoryName.of_string "default", (repository_url, None)] |> |
| 45 | +@@ -158,5 +159,5 @@ |
| 46 | + I.with_wrappers @| wrappers ~sandboxing |> |
| 47 | + I.with_recommended_tools @| recommended_tools |> |
| 48 | + I.with_required_tools @| required_tools ~sandboxing |> |
| 49 | +- I.with_init_scripts @| init_scripts |> |
| 50 | ++ I.with_init_scripts @| init_scripts ~sandboxing |> |
| 51 | + I.with_dl_tool @| dl_tool |
0 commit comments