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.
(currently based against v0.4.0 since master is broken)
I switched out nix-user-chroot with proot, since proot doesn't require userspaces and therefore should work on all distros.
This should solve #50
I also swapped out bzip2 with
xz -1
(lzma) which uses multiple cores to compress and also should be significantly faster to extract according to online benchmarks (see for example: https://www.rootusers.com/gzip-vs-bzip2-vs-xz-performance-comparison/)Alternatively we could use gzip/pigz to compress, which would be even faster to decompress, but the file size will be much larger.
I found
xz -1
to be a good middle ground.The current problem is that some dependencies of proot seem to be missing. If I execute the bundled binary inside an alpine docker container it raises the following error:
./nix/store/mmcsv1szs7w0mjh430jrvj2nrhz6rwr8-proot-20190510/bin/proot: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: Error 20
@matthewbauer Any idea how to solve that?
Also I don't quite understand what the PATH_ENV variable previously set in makeFlags of nix-user-chroot was needed for.
Maybe that could be the missing part.
Tested via: