initial static home directory implementation #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR starts to implement the "static home directory" idea where instead of setting the home directory to the build directory we instead have one fixed home directory per build and mount the build directory to this one. This implementation uses ZFS to mount the build directory as I'm not sure there's any way around that.
The main pain-point that this PR does a not-so-great job of fixing is the log file. It is opened in the build directory (i.e. the ZFS dataset directory) and so when that dataset directory is remounted to the fixed home directory... all sorts of errors start to happen. The workaround here is to record the log in
/tmp/<id>-logand then copy it over after the build... not ideal... but the code seemed to be working for small examples. The next step will be to try the failing opam-repo-ci ocamlfind jobs.(note: the "always mounting, never unmounting" ZFS datasets problem is not resolved (yet) in this PR)