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

[WIP] anbox: init at 2018-01-06 #33970

Closed
wants to merge 14 commits into from
Closed

[WIP] anbox: init at 2018-01-06 #33970

wants to merge 14 commits into from

Conversation

lukeadams
Copy link
Contributor

@lukeadams lukeadams commented Jan 17, 2018

Motivation for this change

pr for tracking

Anbox allows execution of Android apps within a lxc namespace on the host kernel.
Requires binder and ashmem kmods (included in src), in addition to application of kernel patches.

Probably need to add a NixOS module for this eventually.

Needed to add dbus-cpp (not the same as dbus-cplusplus) and a few other libraries.

currently library commits are after Anbox, need to rebase
Rebased as much as possible (now anbox init is after deps). Still need to reorder to be in the following order for bisectability:

  1. libproperties
  2. libprocess
  3. dbus-cpp
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Jan 17, 2018

We also did some work to get it working here in the past:

https://github.com/volth/nixpkgs/commits/anbox

However it was never finished - maybe you can borrow some code.

@lukeadams
Copy link
Contributor Author

lukeadams commented Jan 17, 2018

That's awesome! Thanks for the link.
I neglected to mention that this does build and run, I just need to see how pkg-provided kernel modules are usually done, and it looks like you guys already got it working – I should be able to cherry pick the NixOS module commits for that! Looks like you guys finished the udev rules, etc. Also looks like you were able to figure out gmock which is nice; I just disabled testing to get it to build.

I like how the linked commits include process-cpp and friends in the anbox cfg for simplicity. Main issue I had to hunt down was newer boost versions (>=1.60) causing issues due to the use of deprecated functions – Anbox only used deprecated functions in one location (might submit upstream pr) but process-cpp and libproperties haven't been updated I suppose due to Ubuntu using an older boost dist-wide...

Also had no idea about fetchbzr

Would eventually like to test this on ARM on my rpi2/nitrogen6x as that's my use case.

@Mic92
Copy link
Member

Mic92 commented Jan 17, 2018

In the module you will need also some networking for LXC, if I remember correctly.

@lukeadams
Copy link
Contributor Author

lukeadams commented Jan 26, 2018

Since volth's branch is relatively complete I'm going to overlay my changes on top of those commits. I've rebased onto master and resolved merge conflicts in this branch, which will eventually become the one in this pr

description = "C++ API for D-BUS";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is @goibhniu ok with that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainer left in due to copy-pasting ;)
most of my commits will be replaced by those in Volth's branch when I get a chance to finish that

description = "C++ API for D-BUS";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

truncate -s 0 tests/CMakeLists.txt
'';

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta is incorrect

description = "C++ API for D-BUS";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

@soredake
Copy link

soredake commented Apr 6, 2018

Any progress?

@lukeadams
Copy link
Contributor Author

Not recently. I plan to finish this PR sometime early to mid May once my classes finish.

@sauyon
Copy link
Member

sauyon commented May 26, 2018

ETA?

@Chiiruno
Copy link
Contributor

I'd also like to see this finished, are you still working on it?

@lukeadams
Copy link
Contributor Author

lukeadams commented May 30, 2018

I personally no longer need it and stopped working on it as a result. Sorry about that...
I'd love to finish it to play around with but its been extremely busy...

@lukeadams lukeadams closed this May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants