On Fri, Jan 30, 2015 at 5:41 PM, Rich Felker <[email protected]> wrote: > On Fri, Jan 30, 2015 at 03:55:02PM -0800, enh wrote: >> as i've said, Android doesn't have /etc/passwd (or /etc/group), and it >> doesn't have setpwent/getpwent/endpwent (or equivalents). you *can* do >> uid/gid or name lookups though, because they do make some degree of >> sense. (so id(1) works.) i've considered implementing getpwent so that >> it would cycle through the well known users, but we don't actually >> have an example of anything that would use it, and it's really not >> obvious that we'd be doing anyone any favors --- code calling getpwent >> that wants to run on Android needs to think long and hard about >> exactly what it means by that, and whether it makes any sense at all. > > The main application I've seen that makes _any_ sense is > tab-completion of usernames in the shell.
yeah, which wouldn't be very useful on a system that's so locked down by SELinux that users are very much not interchangeable. >> the fact that Android tends to be pretty locked down with SELinux >> means it's going to be tricky to test a lot of toybox things, but >> getting to a point where i can run the test suite is definitely a >> goal. just not a priority (because i can run the tests on the desktop >> with bionic). > > Is there any guide to getting bionic built and working on a desktop > system, short of doing a complete android build? I tried a while back > with the gentoobionic repo which was setup to work without the android > build system, but didn't get anywhere with it. This is not something I > have a lot of time to spend on, but I'd like it if I could get > something working to evaluate differences between musl and bionic. not really because we always need the whole tree anyway, but "cd bionic ; mma -j32" is probably a good place to start to only build the dependencies. (this is after the usual "source build/envsetup.sh ; lunch aosp_x86_64-eng".) there's a build target in bionic/tests to run the tests on the host that will set up /system so that Android binaries will run (because the toolchain hardcodes the linker's path, and that's /system/bin/linker64). everything else can be diverted with environment variables, which that build target also does. details of how to submit patches is at https://source.android.com/source/submit-patches.html :-) > Rich _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
