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

add recursive bind option #46

Closed
eadmaster opened this issue Apr 1, 2014 · 3 comments
Closed

add recursive bind option #46

eadmaster opened this issue Apr 1, 2014 · 3 comments

Comments

@eadmaster
Copy link

I'd like to request a recursive bind option that works like this:

proot --recursive-bind /tmp/usr:/usr

Instead of hiding the whole /usr dir it should iterate over /tmp/usr/* and bind all the contained files.

I know the same thing could be implemented with a shellscript, but if there are a lot of files in /tmp/usr/* we could get a very long commandline and the shell may truncate it...

@cedric-vincent
Copy link
Contributor

Hello Andrea,

I'd like to keep PRoot command-line interface as simple as possible, and let users use their favorite programming languages to do more complex things. This is the same reason why PRoot does not have any configuration files. To me, no command-line interface nor configuration syntax can be as powerful as user's favorite programming language (whatever it is) :)

With your example, it's a one-liner in shell:

proot $(cd /tmp/usr; for i in *; do echo "-b /tmp/usr/$i:/usr/$i"; done)

If this command-line is truncated because it is too long, then I should implement support for response files instead, à la GCC http://gcc.gnu.org/wiki/Response_Files

@eadmaster
Copy link
Author

the POSIX ARG_MAX averange value is 20k, which should be sufficient in most cases, but the min value is only 4096!

btw the one-liner does not work as expected: we must use find to iterate over files and skip dirs:

proot $(cd /tmp/usr; find -type f -printf " -b /tmp/usr/%p:/usr/%p")

@cedric-vincent
Copy link
Contributor

Hello Andrea,

the POSIX ARG_MAX averange value is 20k, which should be sufficient in most cases, but the min value is only 4096!

Feel free to open a new issue about response file support.

Regards,
Cédric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants