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

etc is in wrong place #1836

Closed
shawnl opened this issue Nov 26, 2017 · 45 comments
Closed

etc is in wrong place #1836

shawnl opened this issue Nov 26, 2017 · 45 comments

Comments

@shawnl
Copy link
Contributor

shawnl commented Nov 26, 2017

etc is in /data/data/com.termux/files/usr/etc instead of /data/data/com.termux/files/etc

its confusing.

Is there a reason for this?

@SDRausty

This comment was marked as spam.

@SDRausty

This comment was marked as spam.

@shawnl
Copy link
Contributor Author

shawnl commented Nov 26, 2017

tmp var and etc

Everything that can't be read-only

Symlinks will probably be needed to keep stuff working.

@SDRausty

This comment was marked as spam.

@ghost
Copy link

ghost commented Nov 26, 2017

@SDRausty never put /tmp to sdcard. This can break some tools (such as tmux) which need to create sockets or other special files.

screenshot_20171126-113446

@SDRausty

This comment was marked as spam.

@ghost
Copy link

ghost commented Nov 26, 2017

@SDRausty, mounting loopback device as /tmp is possible, but requires root. There is not possible (at my opinion) to grant a mount permission for regular android application.

@SDRausty

This comment was marked as spam.

@JamesFinn
Copy link

@xeffyr GNUroot Debian mount and have modules to simulate root over them!

@ghost
Copy link

ghost commented Nov 26, 2017

Ok, I will check if it can mount EXT4 or FAT32 images in userspace.

@ghost
Copy link

ghost commented Nov 26, 2017

Debian noroot cannot mount filesystem images:
screenshot_20171126-144656

If you can mount image in Debian noroot, then post screenshots or other info how you do that.

@SDRausty

This comment was marked as spam.

@ghost
Copy link

ghost commented Nov 26, 2017

@ghost
Copy link

ghost commented Nov 26, 2017

To mount filesystem image, it's needed to port entire kernel subsystem to userspace, or use FUSE (for which root is needed in android)

@SDRausty

This comment was marked as spam.

@JamesFinn
Copy link

@SDRausty no fakeroot cannot mount any image like .dat .img etc you need real root for this purpose

@JamesFinn
Copy link

@xeffyr do you think fakeroot can mount?
Post here

@ghost
Copy link

ghost commented Nov 26, 2017

@JamesFinn no, it cannot, because it's needed to port entire kernel subsystem to userspace, or use FUSE (for which root is needed in android) is needed to simulate mount. Bind mount as proot already do is more simple.

@ghost
Copy link

ghost commented Nov 26, 2017

And no one will port kernel drivers to the userspace for using under proot. Also this will make proot very slow.

Fakeroot is a tool that simulates root UID, and no more.

@shawnl
Copy link
Contributor Author

shawnl commented Nov 26, 2017

I already suggested moving tmp in another issue. I was just saying it shouldn't be under usr. My bad for the confusion

@ghost
Copy link

ghost commented Nov 26, 2017

@shawnl I have already opened PRs for /tmp

  1. Shell script version - use /data/data/com.termux/cache as TMPDIR #1788
  2. On app side - use /data/data/com.termux/cache as TMPDIR termux-app#478

Both for me working good. But we need a comment from @fornwall.

@SDRausty

This comment was marked as spam.

@ghost
Copy link

ghost commented Nov 26, 2017

@SDRausty why not just a use shell script that will setup everything when Termux session start (for those who have root).

@SDRausty

This comment was marked as spam.

@SDRausty

This comment was marked as spam.

@ghost
Copy link

ghost commented Nov 26, 2017

@SDRausty to make root you need to crack android 😆 .

@SDRausty

This comment was marked as spam.

@SDRausty

This comment was marked as spam.

@ghost
Copy link

ghost commented Nov 26, 2017

@SDRausty no, I don't know open source apps for rooting, but maybe on github you can find some exploits that can be compiled and used, but on old Android versions may be.

Why not to use a regular root method that appropriate for your device, on xda-developers you can find a many of them.

@SDRausty

This comment was marked as spam.

@JamesFinn
Copy link

@xeffyr I'm also agree with /tmp.
But why it's not get an look from Fronwall is there any problem?

@SDRausty

This comment was marked as spam.

@shawnl
Copy link
Contributor Author

shawnl commented Nov 26, 2017 via email

@Quasic
Copy link
Contributor

Quasic commented Nov 26, 2017

If /usr contained a r/o tree, it could be moved to the SDcard? Updates could be a problem, though, at least in some cases of updating /usr/share...

@ghost
Copy link

ghost commented Nov 26, 2017

@Quasic, did you think about file permissions ? Android /sdcard and external SD (which is a FAT or EXFAT) does not support file permissions.

But you could try, if you still want:

mv $PREFIX/share /sdcard/
ln -s /sdcard/share $PREFIX/share

@Quasic
Copy link
Contributor

Quasic commented Nov 26, 2017

If it was up to me, /var and /etc are the only ones I would consider splitting here, as there is another issue for /tmp. Since this could be implemented on my side with symlinks, I might try this, actually, as I am trying the /tmp split.

@Quasic
Copy link
Contributor

Quasic commented Nov 26, 2017

@xeffyr I tried with only /usr/share/java a while ago, to merge the jars with the ones in my project folder on the SD, and it failed to set the timestamp, causing an abort on update. I expect other issues would occur with other files, as well, though most could probably be fixable, if desired...

@ghost
Copy link

ghost commented Nov 26, 2017

@Quasic I have the same failed to set the timestamp when extracting tar archives but it is not fatal. This is due to limitation of Android's virtual filesystem on /sdcard.

There is probably only one fix - patch programs to hide such errors, but this is a bad way and shouldn't be used.

@ShalokShalom
Copy link

ShalokShalom commented Dec 23, 2017

This shows there is no /etc at all: https://termux.com/linux.html

@ghost
Copy link

ghost commented Dec 23, 2017

there is no /etc at all

etc is exist, but it is prefixed as everything else. Path to etc is /data/data/com.termux/files/usr/etc. And it can't be moved to the real rootfs (which is /).

@ShalokShalom
Copy link

Well, its confusing.

@ghost
Copy link

ghost commented Dec 23, 2017

@ShalokShalom, this topic about moving 'etc' from $PREFIX/etc to /data/data/com.termux/files. IMO, this will be more confusing as other package data will be in $PREFIX.

Current place of 'etc' shouldn't be confusing if you assume that $PREFIX is a 'real' rootfs.

@ShalokShalom
Copy link

I mean the documentation.

@shawnl
Copy link
Contributor Author

shawnl commented Jan 3, 2018

This issue has not created good discussion and is unlikely to be fixed. It is also mostly a style thing. Thus closing.

@shawnl shawnl closed this as completed Jan 3, 2018
@ShalokShalom
Copy link

🙄

@termux termux locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants