WIP: use proot and xz#69
Open
DavHau wants to merge 1 commit into
Open
Conversation
Contributor
|
@DavHau any idea if this will be incorporated into the project? nix-bundle looks very exciting, but it still has these issues :( |
Member
Author
|
I was originally working on this PR because I wanted to use this bundler for https://github.com/davhau/nix-portable Anyways, I think the fix here is simple. Proot needs to be built static. But then again, the nixpkgs static proot package is broken. We could just pull a static proot binary from proot's gitlab like I did it with nix-portable. |
This was referenced May 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 -1to 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: