Commit Graph

22249 Commits

Author SHA1 Message Date
agnostic-apollo 7b9b9b6224 fix(run-docker.sh): Fix docker exec not passing kill signals (ctrl+c) to commands in some cases leaving processes still running
If `--tty` is not passed to `docker exec` because stdout is not available (`[ ! -t 1 ]`), like due to redirection to file (`&> build.log`) or if stdin is not available (`< /dev/null`), then docker does not forward kill signals to the process started and they remain running.

To fix the issue, the `DOCKER_EXEC_PID_FILE_PATH` env variable with the value `/tmp/docker-exec-pid-<timestamp>` is passed to the process called with `docke exec` and the process started stores its pid in the file path passed. Traps are set in `run-docker.sh` that runs the `docker exec` command to receive any kills signals, and if it does, it runs another `docker exec` command to read the pid of the process previously started from `DOCKER_EXEC_PID_FILE_PATH` and then kills it and all its children.

See Also:

https://github.com/docker/cli/issues/2607
https://github.com/moby/moby/issues/9098
https://github.com/moby/moby/pull/41548
https://stackoverflow.com/questions/41097652/how-to-fix-ctrlc-inside-a-docker-container

Also passing `--init` to `docker run` to "Run an init inside the container that forwards signals and reaps processes", although it does not work for above cases, but may helpful in others. The `--init` flag changes will only engage on new container creation.

https://docs.docker.com/engine/reference/run/#specify-an-init-process

https://docs.docker.com/engine/reference/commandline/run/

```
./scripts/run-docker.sh ./build-package.sh -f libjpeg-turbo  &> build.log
^C
$ ./scripts/run-docker.sh ps -efww
Running container 'termux-package-builder' from image 'termux/package-builder'...
UID          PID    PPID  C STIME TTY          TIME CMD
builder        1       0  0 05:48 pts/0    00:00:00 bash
builder     9243       0  0 06:01 pts/1    00:00:00 bash
builder    28127       0  0 06:12 ?        00:00:00 /bin/bash ./build-package.sh -f libjpeg-turbo
builder    28141   28127  0 06:12 ?        00:00:00 /bin/bash ./build-package.sh -f libjpeg-turbo
builder    28449   28141  1 06:12 ?        00:00:00 ninja -w dupbuild=warn -j 8
builder    28656   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28657   28656 79 06:12 ?        00:00:01 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28694   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28695   28694 89 06:12 ?        00:00:00 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28728   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28729   28728  0 06:12 ?        00:00:00 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28731   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28734   28731  0 06:12 ?        00:00:00 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28740   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28741   28740  0 06:12 ?        00:00:00 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28744       0  0 06:12 pts/2    00:00:00 ps -efww
builder    28748   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28752   28748  0 06:12 ?        00:00:00 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28753   28449  0 06:12 ?        00:00:00 /bin/sh -c /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28754   28753  0 06:12 ?        00:00:00 /home/builder/.termux-build/_cache/android-r23c-api-24-v0/bin/clang
builder    28755   28449  0 06:12 ?        00:00:00 ninja -w dupbuild=warn -j 8
$ ./scripts/run-docker.sh ./build-package.sh -f libjpeg-turbo  &> build.log
$ ./scripts/run-docker.sh ./build-package.sh -f libjpeg-turbo
Running container 'termux-package-builder' from image 'termux/package-builder'...
ERROR: Another build is already running within same environment.
```
2022-07-28 15:27:20 +05:00
agnostic-apollo 571db28a3d termux_step_configure_cmake: Revert CMAKE_INSTALL_LIBDIR old behaviour changed in 2af00064
Absolute paths are still allowed in `DCMAKE_INSTALL_LIBDIR` as per https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Different packages have different way of handling `DCMAKE_INSTALL_LIBDIR`. The `libprotobuf` is appending an absolute path to `build` directory (#10068), while `libjpeg-turbo` is not appending a relative `lib` path to `DCMAKE_INSTALL_PREFIX` and instead  appending to `build` directory and so all the lib files stay at `/home/builder/.termux-build/libjpeg-turbo/build/lib` and hence won't get added to the `deb`, which results in `openjdk-17` failing if `-i` is not passed to `build-package.sh`, since it can't find `libjpeg.so` with `-L${TERMUX_PREFIX}/lib` after compilation from source, unless `-L$TERMUX_TOPDIR/libjpeg-turbo/build/lib` is passed.

Considering that most packages would likely be considering an absolute path passed in `DCMAKE_INSTALL_LIBDIR` to actually be absolute, the default behaviour should be reverted, specially considering it is what's been working, otherwise lot of packages would need testing, like from https://github.com/termux/termux-packages/commit/9155acd040.

```
checking for which libjpeg to use... system
checking jpeglib.h usability... yes
configure: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!
checking jpeglib.h presence... no
checking for jpeglib.h... yes
configure: WARNING: jpeglib.h: proceeding with the compiler's result
configure: error: --with-libjpeg=system specified, but no libjpeg found
checking for jpeg_CreateDecompress in -ljpeg... no
configure exiting with result code 1
```

```
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libturbojpeg.so
-- Installing: /data/data/com.termux/files/usr/bin/tjbench
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libturbojpeg.a
-- Installing: /data/data/com.termux/files/usr/include/turbojpeg.h
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libjpeg.a
-- Installing: /data/data/com.termux/files/usr/bin/rdjpgcom
-- Installing: /data/data/com.termux/files/usr/bin/wrjpgcom
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/README.ijg
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/README.md
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/example.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/tjexample.c
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/libjpeg.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/structure.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/usage.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/wizard.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/LICENSE.md
-- Installing: /data/data/com.termux/files/usr/share/man/man1/cjpeg.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/djpeg.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/jpegtran.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/rdjpgcom.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/wrjpgcom.1
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/pkgconfig/libjpeg.pc
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/pkgconfig/libturbojpeg.pc
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake
-- Installing: /data/data/com.termux/files/usr/include/jconfig.h
-- Installing: /data/data/com.termux/files/usr/include/jerror.h
-- Installing: /data/data/com.termux/files/usr/include/jmorecfg.h
-- Installing: /data/data/com.termux/files/usr/include/jpeglib.h
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libjpeg.so
-- Installing: /data/data/com.termux/files/usr/bin/cjpeg
-- Installing: /data/data/com.termux/files/usr/bin/djpeg
-- Installing: /data/data/com.termux/files/usr/bin/jpegtran
...
2022-07-28 15:27:20 +05:00
agnostic-apollo b9b5987319 fix(build-package.sh): Ensure dependency packages are force rebuilt as well if `-f` is passed 2022-07-28 15:27:20 +05:00
agnostic-apollo cd2928cbe1 fix(build-package.sh): Do not use dependencies while building from repo if it hosts packages built for a different package name than TERMUX_APP_PACKAGE 2022-07-28 15:27:20 +05:00
Pooya Moradi ea66e0a7c7 new package: restish 2022-07-28 14:50:23 +08:00
Termux Github Actions 5fe24d3a80 neovim-nightly: update to 0.8.0-dev-725-gfe254fb7e
This commit has been automatically submitted by Github Actions.
2022-07-28 06:17:09 +00:00
Termux Github Actions fcac32f8f7 stylua: update to 0.14.2
This commit has been automatically submitted by Github Actions.
2022-07-28 00:27:38 +00:00
Termux Github Actions 517a96d536 railway-cli: update to 1.8.4
This commit has been automatically submitted by Github Actions.
2022-07-27 18:16:02 +00:00
Termux Github Actions 4a9ca0f444 jfrog-cli: update to 2.22.0
This commit has been automatically submitted by Github Actions.
2022-07-27 18:14:10 +00:00
Termux Github Actions 693e1c9be6 germanium: update to 1.2.3
This commit has been automatically submitted by Github Actions.
2022-07-27 18:12:01 +00:00
Termux Github Actions 1b6f4ddc90 flyctl: update to 0.0.362
This commit has been automatically submitted by Github Actions.
2022-07-27 18:11:36 +00:00
Li Chong Yun afc9d7f597 fastfetch: update to 1.6.1 2022-07-28 01:51:30 +08:00
Li Chong Yun 57da9b0c2b
neovim-nightly: fix TERMUX_PKG_VERSION 2022-07-27 22:11:48 +08:00
Termux Github Actions 60016d5fda lychee: update to 0.10.1
This commit has been automatically submitted by Github Actions.
2022-07-27 13:16:49 +00:00
Termux Github Actions 69e57fe56a geth: update to 1.10.21
This commit has been automatically submitted by Github Actions.
2022-07-27 13:07:11 +00:00
Termux Github Actions 75fb508ccb clvk: update to 0.0.20220727gddce1003
This commit has been automatically submitted by Github Actions.
2022-07-27 13:04:14 +00:00
Termux Github Actions 948e996669 neovim-nightly: update to 0.8.0-dev-708-g57ce6c2b8
This commit has been automatically submitted by Github Actions.
2022-07-27 06:22:10 +00:00
Termux Github Actions 71866b9182 flyctl: update to 0.0.361
This commit has been automatically submitted by Github Actions.
2022-07-27 06:12:30 +00:00
Li Chong Yun 1ba59b98d7 duc: update to 1.4.5 2022-07-27 10:32:34 +08:00
Termux Github Actions 5fcbc4f115 neovim-nightly: update to 0.8.0-dev-699-gcbfae548e
This commit has been automatically submitted by Github Actions.
2022-07-27 00:37:10 +00:00
Li Chong Yun 1543df57fa neovim-nightly: fix termux_pkg_auto_update 2022-07-27 08:22:50 +08:00
Termux Github Actions 43cac2e95c nnn: update to 4.6
This commit has been automatically submitted by Github Actions.
2022-07-26 18:13:04 +00:00
Termux Github Actions ec3ce689c0 lua-language-server: update to 3.5.1
This commit has been automatically submitted by Github Actions.
2022-07-26 12:14:15 +00:00
Termux Github Actions a78868fc86 gh: update to 2.14.3
This commit has been automatically submitted by Github Actions.
2022-07-26 12:12:16 +00:00
Li Chong Yun edbfe03e77
profile.json: update to e258d66f17 2022-07-26 15:57:12 +08:00
Pooya Moradi 0f6302d8c2 new package: difftastic 2022-07-26 14:50:08 +08:00
Termux Github Actions a20dbb08f3 neovim-nightly: update to 0.8.0-dev-nightly-10-g1a07044c1
This commit has been automatically submitted by Github Actions.
2022-07-26 06:18:32 +00:00
2096779623 4e28dbbdc5 upgpkg(main/quick-lint-js): update to 2.8.0
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-26 10:18:35 +05:30
Termux Github Actions ce9d452a84 flyctl: update to 0.0.360
This commit has been automatically submitted by Github Actions.
2022-07-25 18:11:39 +00:00
Termux Github Actions 3549473e34 jfrog-cli: update to 2.21.5
This commit has been automatically submitted by Github Actions.
2022-07-25 12:15:04 +00:00
Termux Github Actions 05b7674951 neovim-nightly: update to 0.8.0-dev-nightly-4-ge9b58a619
This commit has been automatically submitted by Github Actions.
2022-07-25 06:18:30 +00:00
2096779623 9b7811f076 upgpkg(main/cookcli): update to 0.1.6
Co-authored-by: buttaface <butta@fastem.com>
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-25 08:40:39 +05:30
Termux Github Actions 3958def066 clvk: update to 0.0.20220724g15983822
This commit has been automatically submitted by Github Actions.
2022-07-25 01:19:30 +00:00
Termux Github Actions f28c69cc01 o-editor: update to 2.55.0
This commit has been automatically submitted by Github Actions.
2022-07-24 12:14:39 +00:00
Termux Github Actions d067342399 mu: update to 1.8.7
This commit has been automatically submitted by Github Actions.
2022-07-24 12:13:43 +00:00
Termux Github Actions a38648e546 neovim-nightly: update to 0.8.0-dev-nightly-2-gea13dce3b
This commit has been automatically submitted by Github Actions.
2022-07-24 06:17:07 +00:00
2096779623 799ca27a8d upgpkg(main/mautrix-whatsapp): update to 0.6.0
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-24 10:53:11 +08:00
2096779623 ce7bfec355 upgpkg(main/lgogdownloader): update to 3.9
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-24 10:53:11 +08:00
2096779623 32d517247a upgpkg(main/libftxui): update to 3.0.0
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-24 10:53:11 +08:00
2096779623 6aa66aee56 upgpkg(main/hcl): update to 2.12.0
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-24 10:53:11 +08:00
2096779623 5c7517d146 upgpkg(main/gron): update to 0.7.1
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-24 10:53:11 +08:00
2096779623 594c01a4dd upgpkg(main/csol): update to 1.5.0
Signed-off-by: 2096779623 <admin@utermux.dev>
2022-07-24 10:53:11 +08:00
Jia Yuan Lo 07a29664cc fix(main/emscripten): fix npm install warn messages 2022-07-24 09:00:28 +08:00
Jia Yuan Lo 55395cab41 fix(main/emscripten): disable shm_open & shm_unlink usage on LLVM
Now even LLVM wants to use shm_open and shm_unlink!
1b1f1c7786

I don't think I want to maintain extra stuff yet (for emscripten scope).
Declare custom shm_open and shm_unlink may not work without breaking
for big projects like LLVM.
2022-07-24 09:00:28 +08:00
Jia Yuan Lo 0ff8432018 upgpkg(main/emscripten): to 3.1.17
Includes:
* update patches
* improve custom auto update failure message
2022-07-24 09:00:28 +08:00
Termux Github Actions 77f80deca9 vale: update to 2.20.1
This commit has been automatically submitted by Github Actions.
2022-07-24 00:32:37 +00:00
Termux Github Actions 00692d6333 harfbuzz: update to 5.0.1
This commit has been automatically submitted by Github Actions.
2022-07-24 00:28:05 +00:00
Lucy Phipps 34bc41c4a5
Revert "vim, vim-python: update to 9.0.0050"
This reverts commit 0b60178b4b.
2022-07-23 22:58:21 +01:00
Lucy Phipps 0b60178b4b
vim, vim-python: update to 9.0.0050 2022-07-23 22:10:56 +01:00
Termux Github Actions 2fcf804982 flyctl: update to 0.0.359
This commit has been automatically submitted by Github Actions.
2022-07-23 18:16:32 +00:00