Commit Graph

11 Commits

Author SHA1 Message Date
agnostic-apollo d9bacc132e added(termux-tools): Add all exported `TERMUX_*` variable values to termux-info output instead of just `TERMUX_VERSION` 2022-04-20 23:16:54 +05:00
Maxython 16a6f0caad termux-tools: add new system value TERMUX_MAIN_PACKAGE_FORMAT 2022-02-01 15:10:30 +01:00
Leonid Pliushch 05d57dc5cb
termux-tools: adjust termux-info for supporting pacman package management base
Support reporting updates and repository subscriptions for Pacman.
2021-12-15 20:16:45 +02:00
Leonid Pliushch 0f0c92dd3f
termux-tools: termux-info: do not attempt to list sources.list.d if not available 2021-10-13 14:14:32 +03:00
Leonid Pliushch 5869846d14
termux-tools: termux-info: if TERMUX_VERSION is unset, report app version as 'unsupported' 2021-09-17 16:18:11 +03:00
Leonid Pliushch 8d447cb1b4
termux-tools: show application version when running termux-info (#6547) 2021-03-20 15:46:44 +02:00
Leonid Pliushch dc14c12940 apt: prevent usage of certain commands as root
Usage of package manager as root has certain bad effects in Termux such as
messed up SELinux contexts and ownership. Root checks done in 'pkg' wrapper
are not reliable because one can execute 'apt' directly or with third-party
script downloaded from the Internet.

This commit adds user id check and if it found that uid is 0, apt will
refuse to do any work in root session. These checks done in such way so
they cannot be bypassed in any way unless command is executed as non-root
user.

Those who use Termux via ADB root shell should be able to switch to Termux
user id with command 'su' in order to have package manager working.

---

This change also affects the 'termux-info' utility:

 * It will no longer use 'apt policy' to detect subscribed repositories. Each
   source will be checked by script manually.

 * Information will be copied to clipboard only if 'termux-api' is installed.

 * Syntax error in timeout command is fixed: 'timeout' doesn't understand the
   argument '-t'.

 * Minor information entries reordering.
2019-11-13 16:38:40 +02:00
Leonid Pliushch 51cdbe0073 termux-tools: use default shebang in sources
This will allow build system to set shebang according to the
current TERMUX_PREFIX.
2019-09-19 23:41:31 +03:00
Henrik Grimler b3cdbc0402 termux-info: add subscribed repositories to printed info 2019-03-31 19:34:54 +02:00
Fredrik Fornwall b069947e0d termux-tools: Avoid pm list in termux-info (#1426) 2017-11-21 05:59:47 +01:00
Oliver Schmidhauser 833973d1be Add termux-info tool (#422)
* Add termux-info tool

* Add more information to termux-info

* Resolve conflicts. Add comment and fix Typo.

* remove empty lines in output
2017-04-09 00:07:06 +02:00