Commit Graph

157 Commits

Author SHA1 Message Date
Leonid Pliushch
14aa1996ae
apt: bump revision 2020-12-07 20:29:20 +00:00
Leonid Pliushch
0686801218
apt: update to 2.1.12 2020-12-07 20:10:06 +00:00
Leonid Pliushch
030ea9465e apt: need libgnutls 2020-11-05 19:35:50 +02:00
Leonid Pliushch
91fa3a889b apt: try fix glob on android 7 2020-11-05 19:17:02 +02:00
Leonid Pliushch
9dffff8858 apt: fix arguments for getsockopt causing errors on i686 2020-11-05 18:29:01 +02:00
Leonid Pliushch
e217e4cf04 apt: add -Wno-c++11-narrowing to CXXFLAGS 2020-11-05 18:11:03 +02:00
Leonid Pliushch
06fbff4755 apt: update to 2.1.11 2020-11-05 17:17:56 +02:00
Leonid Pliushch
9b92a45bc6 fix Termux hardcoded directories in apt, rsnapshot 2020-10-30 22:32:52 +02:00
Leonid Pliushch
7e89e130ce apply prefix verification patches again - now shouldn't cause crash 2020-09-28 02:54:13 +03:00
Leonid Pliushch
a6102de687 Revert "add patches for prefix verification"
This reverts commit 2703e4f68f856bb816c695ab53118306ba8104a4.

https://github.com/termux/termux-packages/issues/5858 - seem to be buffer overflow...
2020-09-28 01:37:34 +03:00
Leonid Pliushch
9d92a7360c add patches for prefix verification - prevent use of prebuilt packages by third parties
Add a small stub which verifies whether /data/data/com.termux/files/usr is readable
into few important packages such like Bash or APT. If this check fails, e.g.
in case if binary was executed in program with different package name (non-Termux),
program will print warning and exit with error status immediately.

This should prevent use of prebuilt packages by third-party applications.

NOTE: for now it uses /data/data/com.termux/files/usr in reversed order to
prevent automatic "blind" patching with sed. Will replace with randomized
XOR-based variant in case if that measure won't be enough.
2020-09-28 00:10:00 +03:00
Leonid Pliushch
9d022115ca apt: bump revision 2020-08-01 02:29:15 +03:00
Lucy Phipps
ad6251f97c apt: allow bzip2 2020-08-01 05:27:27 +01:00
Butta
b6dfeec127 apt: update from 1.4.9 to 1.4.10, use Termux cache directory, and keep downloaded packages by default 2020-07-31 19:28:18 +03:00
Leonid Pliushch
af5fc36867 apt: fix regression when building of apt-ftparchive was disabled and produced empty subpackage 2020-07-09 20:29:22 +03:00
its-pointless
e16ed5140d rebuild apt for new libc++ 2020-07-09 13:51:35 +02:00
Henrik Grimler
6c4affb005 Bump liblzma and dependent packages to restart CI
All except php since it has been uploaded manually
2020-03-20 08:54:28 +01:00
Leonid Pliushch
6d7e9429f7 bump liblzma-dependent packages 2020-03-19 20:58:37 +02:00
Leonid Pliushch
5aa214736c apt: show more informative messages if "repository has no release file"
During repository updates & cleanup there can be a short period of time
when repository metadata is not consistent. There may appear an error
like

 E: The repository 'https://termux.org/package stable Release' does not have a Release file.
 N: Updating from such a repository can't be done securely, and is therefore disabled by default.
 N: See apt-secure(8) manpage for repository creation and user configuration details.

but it may not be clear for some users what can cause the issue.

This commit improves the situation a bit.
2020-01-16 01:55:34 +02:00
Leonid Pliushch
cac8691700 apt: unsplit libapt-pkg as apt depends on it 2019-11-20 23:42:23 +02:00
Henrik Grimler
3abcf56444 apt: add apt-ftparchive and libapt-pkg subpackages 2019-11-20 21:12:44 +01:00
Leonid Pliushch
0bcdeecc1a apt: move gnupg to suggests to prevent its automatic installation during upgrade 2019-11-13 17:09:37 +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
7e6a37fe9a apt: update patches
Reorganize patches for better understanding and ensure they are applied in
expected order.

Another changes:

 * gnupg is now in recommends (used by apt-key).

 * x11-repo is now in suggests.

 * TCSAFLUSH patch is dropped because it is covered by one of NDK patches
   where TCSAFLUSH value is replaced with TCSANOW.
2019-11-13 14:43:04 +02:00
Leonid Pliushch
1786c2d897 apt: use redirectable (termux.org) url for main repository
Makes possible to redirect traffic to mirror in case if main
repository is down (like in https://github.com/termux/termux-packages/issues/4358).
2019-10-20 21:44:43 +03:00
Leonid Pliushch
aebb1ab86c Revert "apt: use redirectable url for main repository"
Reverting since it causes https://github.com/termux/termux-app/issues/1286.

This reverts commit afb59ff17a77943df304159e0fe8ea770fa4bd6b.
2019-10-17 16:14:54 +03:00
Leonid Pliushch
cda2a692fa apt: use redirectable url for main repository
Makes possible to redirect traffic to mirror in case if main
repository is down (like in https://github.com/termux/termux-packages/issues/4358).

Will add small overhead due to http redirect.
2019-10-17 14:14:01 +03:00
Leonid Pliushch
9cb03b6870 apt: add man pages
Fixes https://github.com/termux/termux-packages/issues/2419.
2019-09-23 20:37:00 +03:00
Fredrik Fornwall
ea6b9a4503 apt: Fix build with current cmake 2019-09-17 20:39:03 +02:00
Leonid Pliushch
ba7f9f1c53 apt: fix subpackage script 2019-08-20 14:50:17 +03:00
Leonid Pliushch
c352216c63 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 18:49:13 +03:00
Leonid Pliushch
c81d4c8698 add stubs to prevent on-device building packages with dangerous operations in build.sh
%ci:no-build
2019-08-08 16:58:34 +03:00
Leonid Pliushch
b4015466c9 apt: rebuild package
Should fix following error:

E: Failed to fetch https://dl.bintray.com/termux/termux-packages-24/all/apt-transport-tor_1.4.9-14_all.deb  Hash Sum mismatch
   Hashes of expected file:
    - SHA256:cdbe9700180918d2e195ff580443f5f4fedd1f8bfded8cd461b170ffcc7af05a
    - SHA1:9432727cfa86af2250c20fd7494b243eb4fa3dda [weak]
    - Filesize:844 [weak]

- same as happened with packages geoip2-database and ecj.
2019-07-22 22:43:56 +03:00
Leonid Pliushch
026ebfd1c1 termux-exec should be a dependency of termux-tools
Because it is used by login script and termux-tools is essential anyway.
2019-07-22 02:05:02 +03:00
Leonid Pliushch
4832078d86 reformat build.sh for some packages
* Packages where dependencies were sorted are bumped.
2019-07-22 01:51:28 +03:00
Leonid Pliushch
b628a2c6bf apt: add coreutils and grep for 'apt-key' 2019-07-21 23:19:47 +03:00
Leonid Pliushch
3f6dd6c59c apt: apt-key also requires sed 2019-07-21 23:16:57 +03:00
Leonid Pliushch
dd8e19ba33 apt: need findutils for apt-key 2019-07-21 23:14:56 +03:00
Leonid Pliushch
ac0bce86e2 apt: bump revision 2019-07-15 14:00:28 +03:00
Leonid Pliushch
788ef1eeef apt: bump revision 2019-06-19 20:33:30 +03:00
Leonid Pliushch
8d0a82961c Revert "apt: depend on libiconv"
That was a failed attempt to handle libiconv/libandroid-support upgrade issue.
Completely useless and therefore should be reverted.

Issue was solved by:

 * 75436ef46f1e08b139110435204a3426babaf57d (libandroid-support pre-depends on dpkg)
 * b35e4e4654b669292a51976e09c80b8a8780825a (dpkg will use busybox for tar and rm)

This reverts commit 1ab847733aeea81efee4fa852a2c7231c444fd2d.
2019-05-25 01:34:54 +03:00
Henrik Grimler
117ecbfb88 build-package: install licenses to $PREFIX/share/$PKG/LICENSE 2019-05-19 21:36:30 +03:00
Leonid Pliushch
2cae717a62 apt: depend on libiconv
May be needed to handle some situations while upgrading.
2019-05-06 17:51:20 +03:00
Leonid Pliushch
23bc3b941c apt: bump revision after 0d1170cc 2019-05-06 16:54:15 +03:00
Leonid Pliushch
30addee83a liblzma: build versioned library 2019-05-03 17:02:21 +03:00
Leonid Pliushch
11200afa32 add zlib to dependencies where needed 2019-04-14 16:00:23 +03:00
Leonid Pliushch
5a1f2def3a apt: use correct URL for android-7 packages 2019-03-24 19:02:27 +02:00
Henrik Grimler
dfd4fceb33 apt: recommend game-repo and science-repo and suggest unstable-repo 2019-03-17 21:13:42 +01:00
Leonid Pliushch
c120563b58 fix compilation errors for apt, busybox, imagemagick, libelf, tar 2019-03-10 15:41:38 +02:00
Leonid Pliushch
2c16db52fc bump C++ packages for NDK-19 2019-02-23 13:57:09 +02:00
Wetitpig
7ddcce5701 No backticks 2019-02-15 18:01:09 +02:00
Fredrik Fornwall
ff864d026c apt: Update from 1.4.8 to 1.4.9 2019-01-30 00:40:57 +01:00
Leonid Pliushch
4958548d79 apt: security fix
See https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1812353.
2019-01-22 22:53:03 +01:00
Leonid Pliushch
361d8c519f [incomplete] set licenses for packages 2019-01-20 22:41:50 +01:00
Fredrik Fornwall
a171cf132a apt: Fix HTTP/2 compatibility
Thanks its-pointless for finding the issue!
2018-12-30 23:13:21 +01:00
Fredrik Fornwall
407e3e38d7 apt: Fix ssh:// sources (fixes #3093) 2018-11-28 01:37:15 +01:00
Fredrik Fornwall
fbda528472 apt-transport-tor: Mark as platform-independent 2018-08-03 13:24:46 +02:00
Leonid Pliushch
8fe564cccf apt-transport-tor: use APT's built-in methods to access Tor
Replace old package 'apt-transport-tor'.
2018-08-03 12:59:38 +02:00
Henrik Grimler
24d1b3edcf Remove gnupg1 (#2691)
Remove gnupg1
2018-07-29 21:33:27 +02:00
Fredrik Fornwall
380c2d7bc3 Bump some c++-using packages after libc++ update 2018-06-26 10:48:42 +02:00
Leonid Pliushch
5f451c6c4c apt: fix hardcoded paths 2018-06-22 01:48:00 +02:00
Leonid Pliushch
1878f0c761 apt: don't explicitly specify arch in sources.list 2018-06-07 23:21:38 +02:00
Henrik Grimler
d8cb58be57 apt: fall back to $PREFIX/tmp if TMPDIR is unreadable 2018-02-27 23:22:53 +01:00
Henrik Grimler
4ca0cce74a apt: make trusted.gpg a conffiles so that apt-key added keys are preserved 2018-02-27 23:22:53 +01:00
Fredrik Fornwall
e5a0a9b868 apt: Depend on termux-exec
By having apt (which is an essential package which every user has
installed) depend on termux-exec we push it out to everyone.
2018-01-22 09:54:00 +01:00
Fredrik Fornwall
0763a2d9b9 apt: Avoid needless dependency on libutil 2017-12-29 02:16:08 +01:00
Fredrik Fornwall
42c0073979 apt: Disable tcsetattr() calls
The disabled tcsetattr() calls fails on Android 8, see #1359.
2017-12-29 02:15:24 +01:00
JJRcop
5d6714472b apt: restores apt-mark binary (#1980)
It is useful to find out only the packages you have installed manually vs dpkg --get-selections
2017-12-29 00:59:33 +01:00
Fredrik Fornwall
9493e72698 Avoid hard-coded paths in some more places
The plan is to allow other apps to build packages by changing the
prefix.
2017-11-16 23:37:57 +01:00
Fredrik Fornwall
8ac9cdd3f5 apt: Update from 1.4.7 to 1.4.8 2017-10-15 14:23:05 +02:00
Fredrik Fornwall
51c7760090 Drop need of setting TERMUX_PKG_FOLDERNAME
Instead figure out the top level source folder ourselves.
2017-09-20 00:48:04 +02:00
Fredrik Fornwall
d4c093ad5f apt: Update from 1.2.12 to 1.4.7 2017-09-17 20:51:20 +02:00
Fredrik Fornwall
6c29aaa1c7 Transition from gnustl to libc++
This will make things as std::to_string() and other C++ features
work with a modern and supported C++ library.

We package up libc++_shared.so and bump the revision of every C++
using package to make it rebuild against it.

Users who have built C++ using libraries or programs will probably
need to rebuild them if they are linked against Termux-supplied
libraries, as user code was previously linked against gnustl while
the system libraries are now using libc++, and it's not a good idea
to mix C++ standard libraries in a program.
2017-07-14 00:23:37 +02:00
Fredrik Fornwall
fcf9ddc3d6 Drop more res_init() patches 2017-07-01 08:53:30 +02:00
Fredrik Fornwall
ba940f34c1 apt: Fix building with unified headers 2017-07-01 00:32:45 +02:00
Fredrik Fornwall
580afa5ac7 apt: Remove useless ac_cv_c_bigendian=no 2017-03-18 00:41:19 +01:00
Markus Wagner
de9af52cfc add ssh to the apt transports (#851) 2017-03-17 23:22:28 +01:00
Fredrik Fornwall
95acf6ed4a apt: Fix build failure when libdb is available 2017-03-03 13:40:42 +01:00
Fredrik Fornwall
d4f5107916 apt: Fix some minor build issues, update comment 2017-01-22 22:31:50 +01:00
Fredrik Fornwall
af4dc416ed s/TERMUX_PKG_BUILD_REVISION/TERMUX_PKG_REVISION/ 2017-01-11 01:21:42 -05:00
Fredrik Fornwall
eab01be6d9 apt: Update for new config.{guess,sub} location 2016-09-22 14:20:01 -04:00
Fredrik Fornwall
385c8aef84 Some more clang preparations 2016-09-03 17:48:41 -04:00
Fredrik Fornwall
d4ec417b5b Split out gpgv from gnupg
The full gnupg package is not needed by apt (and thus the base
installation) - gpgv is enough. So we split out gpgv to a separate
package.
2016-08-28 07:35:27 -04:00
Fredrik Fornwall
3f300a10fc Setup libstdc++.so -> libgnustl_shared.so early
Let build-package.sh setup the $PREFIX/lib/libstdc++.so symlink
before building any package, to make sure that all C++ applications
link against a fully featured C++ standard library.

Avoid explicitly declaring a dependency on the libgnustl package
since everyone may link against it at will and instead mark it as
essential.
2016-08-10 19:45:41 -04:00
Fredrik Fornwall
03fffa39cf Switch apt source mirror and add upgrade note 2016-07-19 08:42:38 -04:00
Fredrik Fornwall
3c323c69ae Docker and build updates
- Update to build on ubuntu 16.04.
- Docker: Set FORCE_UNSAFE_CONFIGURE=1. Fixes #275.
- Docker: Various fixes.
- Neovim: No longer require lua.
- Some minor package updates.
2016-05-24 18:38:29 -04:00
Fredrik Fornwall
32a0a74dec apt: Update from 1.2.10 to 1.2.11 2016-05-08 20:04:56 -04:00
Fredrik Fornwall
1e5cf6c36d apt: Update from 1.2.9 to 1.2.10 2016-04-11 08:03:59 -04:00
Fredrik Fornwall
1d29ecee2e apt: Update from 1.2.6 to 1.2.9 2016-04-03 12:41:10 -04:00
Fredrik Fornwall
8ee6c88ff5 apt: Update from 1.2.4 to 1.2.6 2016-03-14 04:30:39 -04:00
Fredrik Fornwall
620ebd766e apt: Do not overwrite sources.list automatically
- Add etc/apt/sources.list to conffiles. Closes #148.
- Update from apt 1.2.3 to 1.2.4.
2016-03-03 17:56:35 -05:00
Fredrik Fornwall
53882d1b07 apt: Update from 1.2.1 to 1.2.3 2016-02-28 02:03:46 -05:00
Fredrik Fornwall
68a532740c apt: Add methods/store added to apt in 1.2 2016-02-02 16:25:46 -05:00
Fredrik Fornwall
039b43de92 apt: Update from 1.1.10 to 1.2.1
Also bundle the new bash completion for 'apt'.
2016-01-28 09:00:41 -05:00
Fredrik Fornwall
52bd1cd31f apt: Update from 1.1.6 to 1.1.10 2015-12-31 04:46:52 -05:00
Fredrik Fornwall
9657ab9687 apt: Transition apt.termux.com -> termux.net
The new apt repository termux.net is behind a CDN, improving
reliability and performance. It also offers optional https.

The old apt.termux.com repository will still function for a while
until everyone has updated to use termux.net.
2015-12-27 01:57:28 -05:00
Fredrik Fornwall
54cb74f98d apt: Update to 1.1.6, default disable SRV records
By disabling SRV records support in apt by default we work around
an issue with HTC devices (fixes #99).
2015-12-25 19:32:51 -05:00
Fredrik Fornwall
9fac4f0856 apt: Update from 1.1.4 to 1.1.5 2015-12-17 12:06:03 -05:00
Fredrik Fornwall
4a70323e83 apt: Update from 1.1.3 to 1.1.4 2015-12-08 02:40:54 -05:00
Fredrik Fornwall
b65e2a462f apt: Fix build failure if glob.h is not available 2015-12-04 10:28:02 -05:00