Commit Graph

86 Commits

Author SHA1 Message Date
Henrik Grimler cea1b34f26
termux-tools: change termux url to termux.dev in motd and description 2022-07-03 08:05:47 +02:00
Henrik Grimler e976a6e530
termux-tools: freenode -> libera.chat in motd message 2022-04-23 22:38:17 +02:00
Leonid Plyushch 97b5924662
termux-tools: add notice that packages are unmaintained 2019-12-21 23:27:24 +02:00
Leonid Plyushch 7da4f866c1
rebuild everything due to termux-elf-cleaner fix
See https://github.com/termux/termux-packages/issues/4287.

%ci:no-build
2019-11-29 14:22:56 +02:00
Leonid Plyushch 54252424d4
termux-tools: do not advertise unstable & x11 repositories in motd
They are going to be disabled for Android 5 & 6.
2019-11-18 14:37:01 +02:00
Leonid Plyushch 0fd035ae2c
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-18 14:32:38 +02:00
Efreak abd6e645f4
Don't run `apt update` if it's been run recently (#4135)
When installing or searching for packages, the `apt update` will run only if it
was not executed within the last 5 minutes. Command `pkg upgrade` will
always execute `apt update` to ensure that latest package versions were
picked during upgrade.
2019-11-18 14:32:37 +02:00
Leonid Plyushch a8cc783a67
termux-tools: use @TERMUX_PREFIX@ instead of path in sources
Ensure that scripts always use correct prefix-specific path.
2019-11-18 14:32:34 +02:00
Fredrik Fornwall 0362f4d3c0 termux-tools: Add /sbin to su path (fixes #4345) 2019-10-06 01:24:07 +02:00
Leonid Plyushch 87c257e0c4 termux-tools: do not print motd on OpenSSH login when config PrintMotd=no
Now OpenSSH will not print motd on its own which may result in duplicate.
Instead it will control the login script via environment variable.

Fixes https://github.com/termux/termux-packages/issues/3941.
2019-09-08 19:20:56 +03:00
Leonid Plyushch 852f93dcb0
add new linter script & fix packages where needed
Linter will check packages submitted for CI build. If error was found,
build will not be allowed.

To ensure that all build.sh scripts are consistent and have at least
minimal allowed quality, linter is permanently enabled for all branches
and pull requests.
2019-08-14 14:55:01 +03:00
Leonid Plyushch e5aeb9853f
packages: standardize values of several control variables for build.sh
Variables

 TERMUX_PKG_PLATFORM_INDEPENDENT
 TERMUX_DEBUG
 TERMUX_PKG_HAS_DEBUG
 TERMUX_PKG_ESSENTIAL
 TERMUX_SUBPKG_ESSENTIAL
 TERMUX_PKG_NO_STATICSPLIT
 TERMUX_PKG_BUILD_IN_SRC
 TERMUX_PKG_FORCE_CMAKE
 TERMUX_PKG_HOSTBUILD

should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.

build-package.sh should make decision based on variable's value but not on
whether it is set or empty.

%ci:no-build
2019-08-12 23:04:11 +03:00
Leonid Plyushch e23c2ced4a
termux-tools: add core packages to dependencies
Some packages are not getting installed after busybox was replaced by separate
packages. This commit should fix that by specifying core packages as dependencies
of the "termux-tools".
2019-08-06 00:56:00 +03:00
Leonid Plyushch 3e8242e505
backport changes from branch 'master' for new format of bootstraps 2019-07-22 03:43:35 +03:00
Leonid Plyushch c4154dde5d termux-tools: provide wrappers for /system/bin/mount and /system/bin/umount
Right now Termux doesn't have utility 'mount' available. Also
on Samsung devices executing /system/bin/mount can cause
linking errors.

Issue https://github.com/termux/termux-packages/issues/4002.
2019-07-01 23:57:24 +02:00
Henrik Grimler 7371567d4a termux-upgrade-repo: fix shebang, and only install packages that are installable
Use comm to get intersection of packages_to_install and installable_packages. Works with both busybox and coreutils comm.
2019-06-09 23:06:00 +02:00
Fredrik Fornwall 4fa2418c08 termux-tools: Add termux-upgrade-repo 2019-05-27 14:05:16 +02:00
Fredrik Fornwall e7a7b6f12c termux-tools: Add initial termux-upgrade-repo 2019-05-19 20:18:56 +02:00
Henrik Grimler baf8effe69 termux-tools: bump revision 2019-04-17 22:23:36 +02:00
Tom Yan bba84410a7 termux-tools: companion of termux/termux-app#1031 2019-04-14 21:47:44 +03:00
Leonid Plyushch 4e7267edbe termux-tools: update motd 2019-04-14 21:42:41 +03:00
Leonid Plyushch 3832f16c0f termux-tools: do not start login shell if not running on terminal
Fixes execution of commands via non-interactive shell with OpenSSH.
Issue https://github.com/termux/termux-packages/issues/3620.
2019-04-09 19:42:36 +02:00
Henrik Grimler cb514b0c6b termux-info: add subscribed repositories to printed info 2019-03-31 20:42:08 +02:00
Wetitpig 78b944ba05 Improve formatting of parantheses for functions 2019-02-09 21:06:31 +02:00
Leonid Plyushch dda6fae8a5 termux-tools: do not provide file path with slash at the beginning
See https://github.com/termux/termux-app/issues/995.
2019-01-27 15:12:38 +01:00
Leonid Plyushch 7ab2997202 termux-tools: distrubute under GPL-3.0
Same license as for Termux app.
2019-01-21 17:17:53 +02:00
Leonid Plyushch 037bcf9566 add licenses for more packages 2019-01-21 17:17:53 +02:00
Jason A. Donenfeld 479b8f9828 termux-tools: use proper su search order
This mirrors the search order in the standard Android PATH, so that the
right tool is used consistently. This makes it easier for something like
Kernel Assisted Superuser to co-exist with Magisk.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-24 00:05:07 +01:00
Fredrik Fornwall edbb4081d3 Use system top
Remove top both from busybox (which is broken on Android 8+), and
procps (which has issues on Android 8+) and use a system wrapper
in termux-tools instead.
2018-11-28 03:02:11 +01:00
Leonid Plyushch 0883785cad termux-tools: export SHELL variable on login (#2632) 2018-07-14 00:02:50 +02:00
Fredrik Fornwall 9d5852dcad termux-tools: Bump version to 0.55 after su warning in pkg 2018-06-13 01:44:07 +02:00
Oliver Schmidhauser ea368bb55d unset LD_PRELOAD in su because magist 16.4 is 32 bit only 2018-05-03 22:46:20 +02:00
its-pointless 1ec6c042a8 termux-tools: Work around for when termux-exec is broken 2018-02-21 00:08:15 +01:00
Fredrik Fornwall b0e16f0ed0 termux-tools: Depend on termux-am (fixes #2101) 2018-02-06 22:34:07 +01:00
Michał Bednarski 0b470897d1 termux-am: Add package 2018-02-05 00:19:21 +01:00
Fredrik Fornwall 6b54ba3b69 termux-tools: Unset LD_PRELOAD when calling system
Some 64-bit systems seems to have 32-bit binaries in /system/bin,
so unset LD_PRELOAD before calling them. See #551.
2018-01-24 17:20:25 +01:00
Fredrik Fornwall 52ec48e06f termux-tools: Avoid pm list in termux-info (#1426) 2017-11-21 05:59:47 +01:00
Fredrik Fornwall c4600d33bc termux-tools: Unset LD_PRELOAD in dalvikvm
See https://github.com/termux/termux-packages/issues/1736
2017-11-01 15:08:50 +01:00
Oliver Schmidhauser fc0718410c packages->pkg in help text (#1599)
* packages->pkg in help text

* Fix pkg at a second placec
2017-10-01 21:42:37 +02:00
Fredrik Fornwall 2cac774bfb termux-tools: Make bin/login handle arguments
As we now use bin/login even from e.g. sshd we need to handle
arguments by forwarding it to the login shell and not displaying
a motd in that case. Fixes #1529.
2017-09-17 22:43:03 +02:00
Fredrik Fornwall 8c4313e32e termux-exec: Add package 2017-09-17 16:12:20 +02:00
Fredrik Fornwall 3be253d7bd termux-tools: Replace help with wiki in motd 2017-09-10 23:14:26 +02:00
Fredrik Fornwall 9a1841f308 termux-tools: Remove 'packages' symlink 2017-09-10 22:39:45 +02:00
Fredrik Fornwall 93f9dea39f Use 'pkg' as shorter form of 'packages'
Fixes https://github.com/termux/termux-app/issues/321.
2017-06-12 03:01:09 +02:00
Fredrik Fornwall 8ad37c2b08 termux-tools: xdg-open should be a symlink 2017-04-16 14:37:07 +02:00
Oliver Schmidhauser 389d8cdb06 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
Fredrik Fornwall b60e08202f termux-tools: Bump version to 0.41 2017-04-02 14:47:41 +02:00
Fredrik Fornwall 9d99cc6543 termux-tools: Allow shorter forms in packages 2017-03-10 15:22:44 +01:00
Fredrik Fornwall bd78c57fd7 termux-tools: Handle --help in termux-open
Fixes #801.
2017-03-01 17:20:37 +01:00
Fredrik Fornwall 30a5b5a7ad termux-tools: Bump version to 0.38 2017-02-28 00:30:51 +01:00