Commit Graph

17 Commits

Author SHA1 Message Date
termux-pacman-bot
f38dd0ee93 tree-wide: port debpython to termux
- debpython is the commands `py3compile` and `py3clean` from Debian. I
  am calling them that because a large chunk of their source code is
  found inside a folder inside Debian's source code named "debpython"
  - 5348f70466

- rather than packaging `.pyc` files into packages, `py3compile` and
  `py3clean` can be called from `postinst` and `prerm` scripts to
  generate all `.pyc` for the `.py` files in the package immediately
  after the package is installed, and remove all `.pyc` files immediately
  before uninstalling the package, respectively

- fixes the error `trying to overwrite '/data/data/com.termux/files/usr/lib/python3.12/__pycache__/cProfile.cpython-312.pyc'` when packages were built on-device, but at the same time, also:

- prevents the warnings `dpkg: warning: while removing python, directory '/data/data/com.termux/files/usr/lib/python3.12/site-packages' not empty so not removed` as long as no packages were installed using `pip`

- The `termux_step_create_python_debscripts.sh` can configure work on debpython (i.e. its `py3copile` and `py3clean` commands) from the glibc package `python-glibc`, if some glibc package is being compiled.

- New variables have been implemented:
- `TERMUX_PYTHON_CROSSENV_BUILDHOME` - location of crossenv's python build libraries.
- `TERMUX_PKG_PYTHON_RUNTIME_DEPS` - configures the installation of the python modules via pip3 in the pkg's debscripts. If not configured in the package, it will use the value from `TERMUX_PKG_PYTHON_TARGET_DEPS`. If the variable is set to `false`, then the customization of installing python modules will be disabled, even if the `TERMUX_PKG_PYTHON_TARGET_DEPS` variable is set in the package.
- `TERMUX_SUBPKG_PYTHON_RUNTIME_DEPS` - configures the installation of the python modules via pip3 in the subpkg's debscripts.

- Implemented reconfiguration of prefixes in python module `sysconfig` and setting in `TERMUX_PYTHON_CROSSENV_BUILDHOME`, so that python modules from crossenv building can specify system paths of termux for correct compilation.

- Added automatic addition of `python-glibc{-glibc}` dependency when using the `TERMUX_PKG_PYTHON_RUNTIME_DEPS` (for pkg; will be disabled, i.e. will not be added, if the variable is set to `false`) or `TERMUX_SUBPKG_PYTHON_RUNTIME_DEPS` (for subpkg) value.

> How to add a new Python package after this?

Everything is the same, except, now, this block is no longer necessary in `build.sh`.

```bash
termux_step_create_debscripts() {
	cat <<- EOF > ./postinst
	#!$TERMUX_PREFIX/bin/sh
	echo "Installing dependencies through pip..."
	pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
	EOF
}
```

- Instead, `scripts/build/termux_step_create_python_debscripts.sh` can now detect the presence of `pip` package lists in `$TERMUX_PKG_PYTHON_TARGET_DEPS`, `$TERMUX_SUBPKG_PYTHON_TARGET_DEPS`, and the `METADATA` file of the Python package if it exists, and automatically insert them as a block into the `postinst` script for all relevant packages.
- `$TERMUX_PKG_PYTHON_TARGET_DEPS` is used for `pip` dependencies that are both on-device build-time and on-device run-time dependencies, and `$TERMUX_PKG_PYTHON_RUNTIME_DEPS` is used for runtime-only `pip` dependencies. `$TERMUX_PKG_PYTHON_RUNTIME_DEPS` overrides `$TERMUX_PKG_PYTHON_TARGET_DEPS` for runtime dependencies,
  - i.e. if `TERMUX_PKG_PYTHON_RUNTIME_DEPS` is not specified, but `TERMUX_PKG_PYTHON_TARGET_DEPS` is, then `TERMUX_PKG_PYTHON_TARGET_DEPS` will be used as both on-device build and on-device runtime dependencies,
  - but if `TERMUX_PKG_PYTHON_RUNTIME_DEPS` is specified, then `TERMUX_PKG_PYTHON_TARGET_DEPS`, if specified, is used only for on-device build-time dependencies.
- If `python-pip` is not already in the dependencies of any package that needs it, the build will fail with an error instructing maintainers to add `python-pip` to the dependencies of the package that needs it.

Co-authored-by: Maxython <mixython@gmail.com>
2026-01-18 09:39:03 +00:00
termux-pacman-bot
30a8a62f3c fix(root/frida): fix build with NDK 28
- Also fix/correct build if `$TERMUX_PKG_API_LEVEL` ever changes at any time
2025-08-07 08:44:35 +00:00
termux-pacman-bot
fbfdafa094 bump(root/frida): 17.2.14 2025-07-26 15:06:04 +00:00
termux-pacman-bot
aa46551cd0 fix(root/frida): Fix version constraints of python dependencies
See install_requires in https://github.com/frida/frida-tools/blob/main/setup.py
2025-07-26 14:05:48 +00:00
termux-pacman-bot
6db8cc6dc8 fix(root/frida): support repeated builds
- Fixes this error:

```
...files/usr/lib/libfrida-gum-1.0.a(meson-generated_.._gumenumtypes.c.o) is incompatible with armelf_linux_eabi
```

In this series of commands:

```bash
scripts/run-docker.sh ./build-package.sh -I -f frida
scripts/run-docker.sh ./build-package.sh -I -f frida
```

- Progress on https://github.com/termux/termux-packages/issues/23492

%ci:no-build
2025-07-26 09:39:17 +00:00
termux-pacman-bot
9dcc62f038 updpkg(root/frida): 17.2.11
frida version 17 has moved over from plain Makefiles to meson, and we
more or less needed to port the package again from scratch.
2025-07-14 11:13:20 +00:00
termux-pacman-bot
2b681d9814 chore(root/frida): force disable auto updates [no ci]
The package is too complex to be updated automatically.
2023-10-25 04:01:40 +00:00
termux-pacman-bot
7a75960cd8 frida: update to 16.1.1 2023-07-08 21:01:21 +00:00
termux-pacman-bot
fb7b84984b tree-wide: setting up python packages and raising the version value 2023-01-16 12:19:17 +00:00
termux-pacman-bot
6a33959505 tree-wide: use git+[...] instead of [...].git for git urls
The termux_git_clone_src script has been updated and now expects git
urls to start with git+ instead.

%ci:no-build
2023-01-01 18:01:29 +00:00
termux-pacman-bot
0937e97dfd updpkg(root/frida): update to 16.0.2
With this update frida is pretty much fully functional again.

Fixes termux/termux-packages#11415
Fixes termux/termux-packages#11113
Fixes termux/termux-packages#12632

frida-discover, which was reported broken in
termux/termux-packages#10170 still does not seem to work (though error
is different than in linked issue):

$ frida-discover -p 9102
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/frida-discover", line 7, in <module>
    import frida_tools.discover
ModuleNotFoundError: No module named 'frida_tools.discover'
2022-10-30 13:46:58 +00:00
termux-pacman-bot
b99758d101 frida: Revbump to rebuild against Python 3.11 2022-10-29 23:40:48 +00:00
termux-pacman-bot
66162978c7 root-packages/frida 2022-08-05 08:31:39 +00:00
termux-pacman-bot
f011f95d90 root-packages/frida 2022-06-27 13:58:49 +00:00
termux-pacman-bot
9b093eaf5b root-packages/frida 2022-06-18 21:38:55 +00:00
termux-pacman-bot
a585e3533f root-packages/frida 2022-06-10 11:38:26 +00:00
termux-pacman-bot
5c4fd1810e &&root-packages/frida-server&&root-packages/frida 2022-06-10 10:42:44 +00:00