Open orowith2os opened 1 year ago
I am currently unable to test this on Fedora or another normal Linux distribution, Android is all I have at the moment.
bubblewrap is primarily intended for, and tested on, GNU/Linux (Linux with GNU libc). Android uses bionic libc, which is lacking many GNU functions.
I'd (eventually, when time permits...) review a pull request adding a feature-check for "do we have get_current_dir_name()
?", and if not, a fallback implementation in terms of calling getcwd()
with an increasingly large buffer.
bubblewrap is primarily intended for, and tested on, GNU/Linux (Linux with GNU libc). Android uses bionic libc, which is lacking many GNU functions.
I know, I was building it on Android mainly because I could. Would musl work here? I don't know if it implements the functions bwrap needs. Worst case I try to install glibc inside of Termux. Will give that a try and see if it works.
I know bwrap likely wouldn't work on Android in the first place, so again, pretty much just because I could.
I'd (eventually, when time permits...) review a pull request adding a feature-check for "do we have get_current_dir_name()?",
Would be appreciated, I'll keep an eye out for that.
Would be appreciated, I'll keep an eye out for that
To be more clear, I meant "if you write it, I'll try to review it". I'm very unlikely to have time to implement fallback code for non-GNU operating system environments myself.
Would musl work here?
musl is in the same situation as bionic libc: probably nobody is routinely building/testing bubblewrap for that environment, but if people (maybe you?) contribute portability improvements then I'll try to review them.
To be more clear, I meant "if you write it, I'll try to review it".
Understood that, meant I'll be watching the PRs for any that might be relevant. I don't think I have the knowledge needed to implement a fallback, but who knows, could be worth a shot.
Interesting, Alpine Linux has bubblewrap in their repos, no dependency on glibc. Maybe musl implements the gnu functions needed here?
Very interesting: https://git.musl-libc.org/cgit/musl/tree/src/misc/get_current_dir_name.c
Seems the work is already done here. Shouldn't be too hard to get it going in bwrap.
I installed all of the appropriate dependencies for building, save for libselinux. Everything goes well until I get to building bubblewrap. Here is the output:
This is using Termux from F-Droid.