Skip to content
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

Open
wants to merge 1 commit into
base: master
from

Conversation

@jorsn
Copy link
Member

commented Aug 3, 2019

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @wavewave @makefu @veprbl @dtzWill

proot-termux: init at 20190505 (termux fork of proot)
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
@matthewbauer

This comment has been minimized.

Copy link
Member

commented Aug 3, 2019

Latest proot should have this support. It was added in proot-me/proot@7ac3387.

@veprbl

This comment has been minimized.

Copy link
Member

commented Aug 5, 2019

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.

@symphorien

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

Sorry, I don't use nix on proot anymore, but maybe @jorsn can test if upstream proot master works well ?

@jorsn

This comment has been minimized.

Copy link
Member Author

commented Aug 6, 2019

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:

This comment has been minimized.

Copy link
@Infinisil

Infinisil Aug 9, 2019

Member

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);

This comment has been minimized.

Copy link
@Infinisil

Infinisil Aug 9, 2019

Member

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: {

This comment has been minimized.

Copy link
@Infinisil

Infinisil Aug 9, 2019

Member
Suggested change
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;

This comment has been minimized.

Copy link
@Infinisil

Infinisil Aug 9, 2019

Member

Use this (and fill out the platforms and license fields as well)

{
  meta = {
    homepage = ...;
    description = ...;
    maintainers = ...;
    platforms = ...;
    license = ...;
  };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.