-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
proot-termux: init at 20190505 (termux fork of proot) #65831
Conversation
proot-termux is needed in some situations to install nix using proot because of some bug related to file moving, probably the system call `renameat2`. This is also reported in the nixos wiki [1]. [1]: https://nixos.wiki/wiki/Nix_Installation_Guide#PRoot
Latest proot should have this support. It was added in proot-me/proot@7ac3387. |
cc @symphorien who added the mention of the fork to the wiki. I guess the wiki page can be updated to recommend building proot from the master instead of using outdated static binaries. |
Sorry, I don't use nix on proot anymore, but maybe @jorsn can test if upstream proot master works well ? |
For me proot master doesn't work well: There is an error during the installation of nix when moving files stating a file doesn't exist. Since the issue with renameat2 is fixed in master (i related it because it has to do with file moving) i investigated it a bit and according to the logs if i run proot with verbosity 5 and use 'mv -v', it might have to do with localization files, but it could also just be additional errors when mv tries to localize an error message. So all i can say for sure now is that there is an unknown error i haven't been able to track down, and compiling proot statically with debugging symbols seems to recompile a whole lot of libs. The termux fork of proot just works so far. |
@@ -0,0 +1,23 @@ | |||
{ proot, stdenv, fetchFromGitHub, ... }@args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never use ...
or @args
in nixpkgs package definitions
# Enable overriding of proot arguments via proot-termux.override. | ||
# Proot is not a function of `proot`, so this must be filtered out. | ||
vanilla = proot.override | ||
(stdenv.lib.filterAttrs (n: _: n != "proot") args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to do this override dance, just use proot
directly below
# Proot is not a function of `proot`, so this must be filtered out. | ||
vanilla = proot.override | ||
(stdenv.lib.filterAttrs (n: _: n != "proot") args); | ||
in vanilla.overrideAttrs (old: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in vanilla.overrideAttrs (old: { | |
in proot.overrideAttrs (old: { |
meta.homepage = https://github.com/termux/proot; | ||
meta.description = "Termux fork of proot, a user-space implementation of " | ||
+ "chroot, mount --bind and binfmt_misc"; | ||
meta.maintainers = [ stdenv.lib.maintainers.jorsn ] ++ old.meta.maintainers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this (and fill out the platforms
and license
fields as well)
{
meta = {
homepage = ...;
description = ...;
maintainers = ...;
platforms = ...;
license = ...;
};
}
Closing, since this is on the border of really being relevant, the issue addressed is hopefully not permanent anyways and I have no time to investigate it deeply. I instead added a hint to the wiki page about the file-does-not-exist-error. |
Motivation for this change
proot-termux is needed in some situations to install nix using proot.
This is due to some bug related to file moving, probably to the system call
renameat2
. This is also reported in the nixos wiki.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @wavewave @makefu @veprbl @dtzWill