termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
761 stars 160 forks source link

How to use fakechroot for Arch Linux with Proot? #113

Closed JanuszChmiel closed 4 years ago

JanuszChmiel commented 4 years ago

Unfortunately, some .pkg packages which can be installed by uisng makepkg command require Fakechroot which can not run for Android. Please does somebody of you know how to recode .pkg script which enforces to use Fakechroot so it will not use it? Using clipboare and recoding lines from .pkg script is not easy. So it is really best if user can use makepkg command. In some cases, I modify architecture to aarch64 to compile for ARM cpu 64 Bit instructions set. But what about fakechroot?

ghost commented 4 years ago

You need fakeroot with TCP-based IPC. That version is not available by default and you need to build it from source.

JanuszChmiel commented 4 years ago

And where to get this special version of fakechroot its source? And is it possible to compile it and build it from Arch Linux?

ghost commented 4 years ago

@JanuszChmiel That's not fakechroot, but fakeroot. makepkg never used fakechroot.

ghost commented 4 years ago

Sources: http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.24.orig.tar.gz

ghost commented 4 years ago

Needs to be configured with --with-ipc=tcp.

JanuszChmiel commented 4 years ago

Do you think, that it will also work from ArchLinux? Or is it only usable from Debian?

ghost commented 4 years ago

It's originally came from Debian and ArchLinux use sources provided at link I posted earlier.

JanuszChmiel commented 4 years ago

So I must type ./configure --with-ipc=tcp To compile with TCP support so it will work on Android crooted distro which run by using Proot?

JanuszChmiel commented 4 years ago

When I run compiled fakeroot It display:

dlsym(acl_get_fd): /usr/local/lib/libfakeroot.so: undefined symbol: acl_get_fd
dlsym(acl_get_file): /usr/local/lib/libfakeroot.so: undefined symbol: acl_get_fi le

dlsym(acl_set_fd): /usr/local/lib/libfakeroot.so: undefined symbol: acl_set_fd
dlsym(acl_set_file): /usr/local/lib/libfakeroot.so: undefined symbol: acl_set_fi le

Do you think, that it is severe or can I ignore those errors?

ghost commented 4 years ago

Ignore it, ArchLinux applies https://git.archlinux.org/svntogit/packages.git/plain/trunk/silence-dlerror.patch?h=packages/fakeroot patch to suppress that error.

JanuszChmiel commented 4 years ago

Oh thank you so much. I can use Fakeroot thanks to yours advice. But command makepkg -si require sudo to be used from my non root user account janusz. And I do not know how to set sudo password for Janusz account which is not root account. Sad and painfull life.

ghost commented 4 years ago

Edit your launch script to temporarily run proot with argument "--root-id". That will start a root shell, so yoy should be able to set a password.

JanuszChmiel commented 4 years ago

Without yours programmers knowledge I would be unhappy for The rest of my life. Thank yoy again.