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

Sysroot support #79

Open
ekilmer opened this issue Jun 7, 2022 · 2 comments
Open

Sysroot support #79

ekilmer opened this issue Jun 7, 2022 · 2 comments

Comments

@ekilmer
Copy link
Contributor

ekilmer commented Jun 7, 2022

Hello, I am wondering more about why the --sysroot option was removed (05ec3ac)?

My use-case is applying libtree to binaries/libraries from extracted firmware image filesystems where I might not be able to compile and run libtree on the device, and this feature would be very nice to have.

I implemented support (also rudimentary) for this myself before I noticed the aforementioned commit that reverted this functionality.

Thank you!

@haampie
Copy link
Owner

haampie commented Jun 8, 2022

It was implemented rather quickly and I didn't want to release it. One open issue was that it wasn't testing whether paths where pointing outside the sysroot, and I didn't want to add realpath type of functions to libtree. Maybe I shouldn't care about going outside the sysroot, since libtree is just a simple read-only utility.

FWIW, libtree barely uses any memory, so it might as well work on not so powerful devices. Otherwise you could maybe use bwrap or some other tool to chroot inside your environment and run a statically compiled libtree there.

@ekilmer
Copy link
Contributor Author

ekilmer commented Jun 9, 2022

Understood! Thank you for the details.

I will look into bwrap.

When I can emulate or access the device in question, I have done as you suggested and statically compiled libtree to run within the environment, which works very well!

I'm unsure if you want to leave this issue open or close, so feel free to close it if you wish.

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