1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-25 12:27:05 +00:00
Commit Graph

1183 Commits

Author SHA1 Message Date
Henrik Grimler
849112f9e7
scripts(massage): remove symbol loop in undefined syms check
Instead create a (rather large) grep pattern, and call egrep only
once.
2022-07-31 20:12:54 +02:00
Henrik Grimler
0de0a8dd52
scripts(termux_error_exit): echo with -e to allow multiline messages 2022-07-31 20:12:51 +02:00
Henrik Grimler
146a5fb9c8
scripts(start_build): fix typo
Fixes 8129569eef ("scripts: fix for building on device")
2022-07-31 19:00:35 +02:00
Li Chong Yun
8129569eef
scripts: fix for building on device
The pre-built binary cannot execute on device. Use the one from repo instead.
2022-07-31 18:56:55 +02:00
Henrik Grimler
5ab6d52854
scripts(massage): specify target api level when running elf-cleaner
Termux-elf-cleaner 2.0.0 added the possibility to specify target api
level with --api-level, instead of just during compile time.
2022-07-30 16:44:07 +02:00
Henrik Grimler
5d07daf772
scripts(start_build.sh): download pre-compiled termux-elf-cleaner
CI now compiles the program on every release, so lets download that
instead of the source in termux_step_start_build.sh.
2022-07-30 16:44:05 +02:00
Henrik Grimler
ae57e3fae0
scripts(setup-termux.sh): install xmlto, needed by git 2022-07-30 16:27:31 +02:00
Henrik Grimler
9d695d6f4b
scripts(setup-ubuntu.sh): install openjdk-17 from ppa repo
This is necessary if we are to build openjdk-17 after update of docker
image to ubuntu 22.04.
2022-07-30 14:34:07 +02:00
Lucinda May Phipps
7e2daf81e1 termux-step-massage: faster empty package check 2022-07-28 15:27:20 +05:00
agnostic-apollo
f598de4ae4 fix(termux_step_massage): Fix typo in 034f29eb 2022-07-28 15:27:20 +05:00
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
Li Chong Yun
edbfe03e77
profile.json: update to e258d66f17 2022-07-26 15:57:12 +08:00
Leonid Pliushch
c532fff051
chore(scripts/Dockerfile): update comments about build/push 2022-07-23 13:35:31 +03:00
Leonid Pliushch
314c6a8aff
enhance(scripts/Dockerfile): upgrade ubuntu version
Ubuntu 21.10 reached its end of life.
2022-07-23 13:35:31 +03:00
Uchiha Kakashi
c2ade8c29a
run-docker.sh: update user id
Since c4041bcf45, we have changed the default user id of builder from 1000 to 1001.
2022-07-23 10:29:54 +08:00
Leonid Pliushch
2205ad383e
fix(scripts/Dockerfile): add missing "&&" 2022-07-23 00:28:39 +03:00
Leonid Pliushch
c4041bcf45
enhance(scripts/Dockerfile): set builder user id to 1001
This will speed up builds on GitHub Actions since runner user id is 1001.
2022-07-23 00:25:51 +03:00
Leonid Pliushch
dc3869ad37
enhance(scripts): use GitHub package registry for Docker image
Should provide better (maybe) download speed when using GitHub Actions.
2022-07-23 00:19:08 +03:00
Henrik Grimler
bc0fa8e154 chore(scripts/*): add shebang to scripts that can be run
Most scripts are set up to just be sourced, but these ones can handle
being run as well. They have not had a shebang set though, use
/usr/bin/bash to ensure they work as intended.
2022-07-22 16:38:44 +02:00
Henrik Grimler
034f29eb0e scripts(massage): only suggest autoreconf if configure.{ac,in} exist 2022-07-22 16:38:44 +02:00
Jia Yuan Lo
16d890f323 enhance(run-docker.sh): add support for Fedora 2022-07-15 22:12:05 +08:00
Chongyun Lee
9d2a355db3 get_hash_from_file.py: ignore Packages.gz/bz2 in Release file 2022-07-11 10:55:57 +02:00
Chongyun Lee
90fda1305b chore: Move REPO-related variables to properties.sh 2022-07-11 15:43:24 +08:00
Uchiha Kakashi
82524e036d
termux_setup_python_crossenv: update to 1.3.0 2022-07-11 03:38:31 +08:00
Yaksh Bariya
5806718974
chore,scripts(properties.sh): update note regarding Repology updater
See termux/repology-metadata@d48519bcb5
for why this note was updated
2022-07-03 16:31:20 +05:30
Henrik Grimler
6cf9f35fac
scripts,ci(*): use termux.dev instead of termux.org
We are now mainly promoting and using termux.dev, so lets switch all
the urls.
2022-07-02 10:41:16 +02:00
Henrik Grimler
1ef9a5d5d2
scripts(setup-ubuntu): install curl headers as well
Needed by txikijs's hostbuild step.

Fixes https://github.com/termux/termux-packages/issues/11085.
2022-06-29 07:29:43 +02:00
Henrik Grimler
be5c7ffc60
scripts(setup-ubuntu.sh): install libjson-perl
Required by samba 4.16.2.
2022-06-26 10:51:36 +02:00
Butta
458c71668c enhance(termux_setup_swift): add a config file to cross-compile Swift packages
Also, fix the checks for whether Swift is installed in the Termux app.
2022-06-25 22:55:36 +05:30
Butta
a0f84bfd9a fix(termux_step_massage): use llvm-readelf instead, as that's what the NDK and Termux use 2022-06-25 22:55:36 +05:30
Henrik Grimler
370dffaf40
Revert "scripts/properties.sh: allow for jdk in /usr/lib/jvm/java-8-openjdk"
This was not suppose to be pushed to master as it causes issues for
some scripts.

This reverts commit 8a400251b7.
2022-06-23 20:35:46 +02:00
Henrik Grimler
8a400251b7
scripts/properties.sh: allow for jdk in /usr/lib/jvm/java-8-openjdk 2022-06-23 20:29:42 +02:00
Henrik Grimler
5be1ac63f0
ci(setup-android-sdk.sh): update to ndk r23c 2022-06-23 20:29:28 +02:00
Henrik Grimler
2c397ea894
scripts(buildorder.py): make it possible to ./build-all.sh again
Seems this broke when termux-root-packages and x11-packages was merged
with termux-packages.
2022-06-18 21:50:23 +02:00
Henrik Grimler
0c4f47e713
Revert "revertme,ci(aptly_api): hardcode proxy-ip to use for deb uploads"
More proper fix by @agnostic-apollo in a3e68e2b89 and 3b76d37dce.

This reverts commit 1615ccc894.
2022-06-18 19:08:38 +02:00
agnostic-apollo
3b76d37dce enhance(scripts): Add support for CURL_ADDITIONAL_OPTIONS in aptly_api functions 2022-06-18 17:39:12 +05:00
Henrik Grimler
1615ccc894
revertme,ci(aptly_api): hardcode proxy-ip to use for deb uploads
Some of the IPs of fosshost's proxy do not work (see
termux/termux-packages#11007), so stick to using one that we know work
until that is fixed.

Suggested by agnostic-apollo.
2022-06-18 11:24:55 +02:00
Butta
b8bfe98f10 upgpkg(swift): 5.6.1 to 5.6.2
Also, add a termux_setup_swift() bash function and move downloading the prebuilt
Swift toolchain for linux there.
2022-06-16 21:31:13 +05:30
tjhexf
302bb99f06 golang: update to 1.18.3 2022-06-07 19:04:25 +05:30
Aditya Alok
3568da318c
scripts(build/termux_setup_meson): patch meson libintl check
- patch meson to always return true for libintl check

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-05-29 11:54:07 +05:30
Yaksh Bariya
009d9a9e98
fixup(termux_setup_cmake): update CMake version
See 2f60dadf60 where checksum was updated
but version wasn't
2022-05-29 10:36:51 +05:30
Yaksh Bariya
2f60dadf60
upgpkg(main/cmake): update to v3.23.2 2022-05-29 10:27:59 +05:30
agnostic-apollo
afad8febe6 added(scripts): Add TERMUX_APPS_DIR as per termux/termux-app@bcd8f4c4 2022-05-29 09:03:31 +05:00
Yaksh Bariya
ad28dd2ad7
Revert "chore,scripts(termux_step_setup_variables): use main host instead of Cloudflare"
This reverts commit 4da820d32c.

Fixed now
2022-05-28 12:36:16 +05:30
Yaksh Bariya
4da820d32c
chore,scripts(termux_step_setup_variables): use main host instead of Cloudflare
Should be reverted as soon as @Grimler91 fixes the DNS/CNAME
configuration

Closes #10835
Closes #10836
2022-05-28 12:27:51 +05:30
agnostic-apollo
0275d9bff3 changed(scripts|main/termux-tools): Use TERMUX_APP_PACKAGE_MANAGER instead of TERMUX_MAIN_PACKAGE_FORMAT
Make changes as per new design implemented in termux/termux-app@b950efec and termux/termux-app#2740

The package build and termux-tools scripts use current package manager for custom logic. The `termux-tools/termux-setup-package-manager` script has been added that will now be used to provide backward compatibility for termux-app `< 0.119.0` (when its released) and validate the package manager. It will also ensure the variable in not unset to prevent `unbound variable` errors if `set -u` is being used by calling scripts.

Closes #10782
2022-05-23 12:14:55 +05:00
Chongyun Lee
4a556e6d30
setup-termux.sh: Install package jq and binutils-is-llvm
Co-authored-by: Chongyun Lee <45286352+licy183@users.noreply.github.com>

Closes #10721
2022-05-19 11:30:08 +05:30
Tee KOBAYASHI
e91b7fa888 termux-services: Make log/run a regular file
so that it is populated properly before installing termux-services.
2022-05-16 08:13:54 +09:00
Tee KOBAYASHI
daa043f4b8 mesa: Update to 22.0.3 2022-05-13 22:47:46 +09:00
Tee KOBAYASHI
15fe94ce97 golang: Update to 1.18.2 2022-05-11 19:36:24 +05:30
Tee KOBAYASHI
24a037a33a new package: news-flash-gtk 2022-05-10 10:20:13 +09:00
Aditya Alok
d0fd4b0baf
refactor: update @MrAdityaAlok email address
- use alok@termux.org instead

%ci:no-build

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-05-10 00:15:34 +05:30
Aditya Alok
50411f24a9
feat(auto update): update packages in there build order
Currently, we assume that a package is not coupled with any specific
version of it's dependencies. Therefore, we update them individually
without any specific order. But this assumtion fails for package
families like lxqt which requires all it's family members to be of
specific version.

Although we would have to manually update dependencies in such
situation (if they can not be auto-updated), but we can atleast
decide order of updation for packages that can be auto-updated.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-05-07 21:23:32 +05:30
Yaksh Bariya
ca4ed956a4
upgpkg(gn): update to 20220502 2022-05-05 17:35:31 +05:30
Tee KOBAYASHI
31aa2d2056 new package: gimp 2022-05-03 07:06:00 +09:00
Aditya Alok
a32429090d
fix(check-auto-update): do not exit if a pkg cannot be auto-updated
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-30 15:10:51 +05:30
Aditya Alok
a43f6b8eba
feat(scripts/check-auto-update): improve script, minor clean up
- add checks for 'newest-tag' as fallback, if 'latest-release-tag' is not found
- adhere to DRY principle

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-30 03:34:19 +05:30
Yaksh Bariya
e907a4d073
chore(scripts/generate-bootstraps.sh): Use Cloudflare proxy
Should speed up downloads and also reduce situations where downloads
simply have to wait for timeout to happen (I have no idea why this
happens, probably nginx trying to cooldown some requests to prevent
(D)DoS?)
2022-04-28 15:17:07 +05:30
Maxython
b98972997f generate-bootstraps.sh: improvement - adding a way to change the package manager and work with db from the pacman service. 2022-04-28 03:14:44 +05:00
Aditya Alok
81007d0053
refactor(auto-update): do not append same log again
- Now auto update will be disable until issue is closed.
- Assign to GITHUB_ACTOR. Myself if GITHUB_ACTOR is Termux bot.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-28 01:37:40 +05:30
Henrik Grimler
4798011417 Revert "scripts/properties.sh: allow for jdk in /usr/lib/jvm/java-8-openjdk"
openjdk might not be available in the various places properties.sh is
sourced, as when linting the packages:
https://github.com/termux/termux-packages/pull/10331.  Revert the
commit to fix this issue.

This reverts commit a7e384c1d9.
2022-04-25 22:22:59 +02:00
Henrik Grimler
348c980d53
Dockerfile: remove unused parts of sdk and ndk in setup-android-sdk instead
Dockerfile setup script doesn't know exactly which ndk/sdk version we
are using, so can't cd to the right folder now that the version is
part of the folder name.
2022-04-25 22:04:41 +02:00
Henrik Grimler
ad4ca4acc4
Dockerfile: copy termux_download.sh to docker image as well
Since it is now used by setup-android-sdk.sh.
2022-04-25 21:50:50 +02:00
Henrik Grimler
a7e384c1d9
scripts/properties.sh: allow for jdk in /usr/lib/jvm/java-8-openjdk 2022-04-25 21:37:47 +02:00
Henrik Grimler
e3034c71fa
scripts/properties.sh: put sdk and ndk in versioned folders
To allow for having multiple sdk/ndk versions in ~/lib/.
2022-04-25 21:37:45 +02:00
Henrik Grimler
429881ad56
setup-android-sdk: use termux_download to get sdk and ndk zips 2022-04-25 21:37:41 +02:00
Aditya Alok
21353d954a
fix(setup ghc): cd to TERMUX_SCRIPTDIR before executing buildorder.py
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-25 22:18:06 +05:30
Aditya Alok
3ba86891ed
fix(setup ghc): register haskell packages recursively
previously only main dependencies were registered, ignoring dependencies of dependencies.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-25 21:52:36 +05:30
Chongyun Lee
9eb2d6d13e
run-docker.sh: Use a custom seccomp profile which allows the personality system call. 2022-04-25 10:09:50 +02:00
Aditya Alok
0de794c1d1
feat(auto-update): handle large logs while creating issues
- GitHub api only allows 65536 chars long body in one go.
- Now body beyond 65536 limit will be appended after a gap of 5 sec.
  Appending (or patching) does not consider already present body, so we
  can bypass this limit.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-24 15:14:00 +05:30
Aditya Alok
d72177e5ce
feat(auto-update): create issue if update fails
- now a new issue with output logs will be created and assigned to
  $GITHUB_ACTOR, if auto update fails for a package

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-23 09:47:32 +05:30
Aditya Alok
85d52a4ab2
chore(auto update): cleanup some codes
%ci:no-build

Above tag is for previous commit but CI checks head commit for
this, so applying here.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-20 23:56:00 +05:30
Aditya Alok
3baa1a3a36
refactor(auto update): replace pkg_dir with TERMUX_PKG_BUILDER_DIR
- this variable will store path of directory containing packages
  `build.sh` file.
- this is a more standard approach than specifying `pkg_dir` each time

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-20 23:56:00 +05:30
Henrik Grimler
56dbb9cf80
CI: specify distribution in repo.json as well
x11-repo uses distribution x11, and root-repo distribution root.
Store this information in the json file as well, and parse it to set
both REPOSITORY_NAME and REPOSITORY_DISTRIBUTION.

Also remove unnecessary `< repo.json` from jq command, jq accepts the
file as an argument.

This fixes upload issues to x11-repo and root-repo.
2022-04-20 16:37:36 +02:00
Yaksh Bariya
fd130685ae
fixup previous commit 2022-04-20 16:43:14 +05:30
Yaksh Bariya
be24cc6016
fixup: fix hardcoded packages directory in termux_pkg_upgrade_version 2022-04-20 16:23:47 +05:30
Henrik Grimler
2af00064dd
termux_step_configure_cmake: fix CMAKE_INSTALL_LIBDIR var
CMake docs [1] show that the variable should be a path relative to
prefix, not an absolute path.

[1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
Fixes: 9155acd040 ("termux_step_configure_cmake: set CMAKE_INSTALL_LIBDIR")
Fixes: https://github.com/termux/termux-packages/issues/10068
2022-04-19 14:48:11 +02:00
Yaksh Bariya
b54abb6732
also install jq inside docker container 2022-04-19 07:19:39 +05:30
Yaksh Bariya
66af228cfe
scripts/lint-packages.sh: adapt to new repository structure 2022-04-19 07:19:39 +05:30
Yaksh Bariya
3422559ad2
monorepo: adapt scripts/bin to new changes 2022-04-18 13:57:19 +05:30
Yaksh Bariya
f0ea9b922b
monorepo: apply changes suggested by buttaface 2022-04-18 13:57:19 +05:30
Yaksh Bariya
52c383b4d1
chore: switch to monorepo 2022-04-18 13:57:13 +05:30
Yaksh Bariya
6088bdfbdb cmake: update to 3.23.1
Co-Authored-By: Tee KOBAYASHI <xtkoba@gmail.com>
2022-04-17 21:45:42 +05:30
Tee KOBAYASHI
c6db2c46c6 new package: lilypond 2022-04-16 18:26:11 +09:00
Yaksh Bariya
dcaf44f95b
ci: sleep only when aptly_add_to_repo returns with status code 000
It is just a waste of time to sleep for 3 minutes when the packages are
successfully added and aptly returns 200 http code
2022-04-16 14:07:17 +05:30
Yaksh Bariya
c4ab7bcfd0
attempt2: Fix repository upload problems
Earlier in 5b8b15e7aa, I had configured
our upload scripts to treat failure of `aptly_add_to_repo` as failure to publish
packages at all. However it won't work, since even if all debs are
uploaded, and aptly_add_to_repo is called, debs are moved from temporary
directory to the repository. The proxy may drop connection during this
moment due to stale connection. And just after that we call
aptly_delete_dir which will delete the temporary directory. On the
server side, aptly will however continue to move debs from temporary
directory. Repository is published, but since the temporary directory is
removed during the transaction, the transaction never completely
succeeds. So only some of the debs are uploaded practically. This is now
fixed by adding a sleep of 180s (should be more than enough for all
stuff)
2022-04-14 17:26:22 +05:30
Yaksh Bariya
5b8b15e7aa
fixup(ci:upload): Treat failure to add debs to repository as error 2022-04-14 11:45:17 +05:30
Tee KOBAYASHI
07d9bba56a
build-package: Apply $PREFIX/bin/sh hack appropriately 2022-04-13 09:03:16 +02:00
Wetitpig
0410a2a1bd LLVM Tools (#7952) 2022-04-13 12:10:32 +05:30
Tee KOBAYASHI
034efbb507 golang: Update to 1.18.1 2022-04-13 11:41:12 +05:30
Aditya Alok
24a1850f47
feat(setup-ubuntu.sh): install xxd package, required by cava
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-11 20:49:14 +05:30
Tee KOBAYASHI
b312b033ab new package: below 2022-04-11 11:04:10 +09:00
Tee KOBAYASHI
d6248b4eb6 termux_step_massage: Check for unresolved symbols
defined in `libandroid-*`
2022-04-10 14:53:07 +09:00
Tee KOBAYASHI
00275fe288 vlc: Enable Lua support 2022-04-08 13:48:37 +09:00
Tee KOBAYASHI
ae7f540379
termux_step_massage: Avoid using CC
which may be unset.
2022-04-06 14:14:03 +02:00
Henrik Grimler
dc033aefef
termux_step_massage: only check for missing symbols if there are libraries 2022-04-05 21:21:29 +02:00
Henrik Grimler
ffa1ed6051
termux_step_massage: check built libs for undefined symbols
Building packages that use libtool for linking libraries has issues
with ndk-r23 (https://github.com/android/ndk/issues/1614).  This check
makes sure that the built libraries do not give an error like

    CANNOT LINK EXECUTABLE "tesseract": cannot locate symbol "__extenddftf2" referenced by "/data/data/com.termux/files/usr/lib/libtesseract.so"...

once used on device.  In https://github.com/android/ndk/issues/1614 it
seemed like arm gave false positives and needed special consideration,
but when I tested it again today the same false positives do not occur
in built libraries, so no "if arm then .." workaround has been added
for now.
2022-04-05 20:57:25 +02:00
Aditya Alok
ae0caf3bd5
feat(auto-update): do not log for disabled auto-update
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-05 20:20:11 +05:30
Aditya Alok
2157e972d9
fix(auto-update): compare versions with epoch added
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-05 11:38:21 +05:30
Aditya Alok
d67a38d324
refactor(auto-update): clean up some code
- move epoch addition to termux_pkg_upgrade_version set.
- now termux_pkg_upgrade_version can be given retrived version/tag from
  api, directly.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-05 11:21:14 +05:30
Aditya Alok
f8cce7faba
fix(auto-update): removal of epoch when TERMUX_PKG_UPDATE_VERSION_REGEXP is set
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-05 00:39:32 +05:30
Aditya Alok
3b92fd5648
Revert "[TEMP] download deps from grimler.se instead of packages.termux.org"
- It should be fixed now.
https://github.com/termux/termux-packages/issues/9860#issuecomment-1087144145

This reverts commit dbd7249e4b.
2022-04-04 11:37:23 +05:30
Aditya Alok
dbd7249e4b
[TEMP] download deps from grimler.se instead of packages.termux.org
- packages.termux.org gives wrong checksum for arm and aarch64 repository metadata
2022-04-04 11:03:30 +05:30
Aditya Alok
442174ca9a
refactor(auto-update): move checking unique packages to standalone script
Hmmm..., why do we even need to check whether package is unique or not if we have
TERMUX_PKG_AUTO_UPDATE=true?

It should be checked before enabling auto-update.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-03 00:48:29 +05:30
Tee KOBAYASHI
3c617f6222 golang: Fix hardcoded /etc/resolv.conf and friends 2022-04-01 17:22:37 +09:00
Aditya Alok
a7d089c195
fix(auto-updates): move extraction of version from regexp to upgrade version step
previously setting TERMUX_PKG_UPDATE_VERSION_REGEXP had no effect on version being wriiten to
build.sh. It was only used for version comparison.

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-04-01 12:58:16 +05:30
Yaksh Bariya
9f28b53c09 cmake: update to 3.23.0 2022-04-01 06:54:18 +00:00
Lucinda May Phipps
bf4f0708b9
auto-updates: fix unique package detection 2022-03-31 09:45:47 +01:00
Aditya Alok
64c2ed40b0
fix(termux_github_api_get_tag): addition of '|000' when extra_curl_opts[1] was empty
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-30 09:26:56 +02:00
Aditya Alok
0c412fe300
Revert "fix autoupdate for projects hosted on GitHub"
This reverts commit 9d98e6bd14.
2022-03-30 09:26:53 +02:00
Yaksh Bariya
9d98e6bd14
fix autoupdate for projects hosted on GitHub 2022-03-29 18:44:37 +05:30
Aditya Alok
c23d019058
feat: replace apt-compare-versions script with termux_pkg_is_update_needed
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-29 01:01:12 +05:30
Aditya Alok
292474f082 fix(termux_github_api_get_tag): expansion of newline in graphql api
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
694a941883 fix(auto update): fix few messages, comments and code
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
08ac4aa4db feat(auto update): add script to get newest version from repology api
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
843823e3f9 feat(auto update): add script to get tags from gitlab api
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
ba0688e4c5 feat(auto update): add script to get tags from github api
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
ea595dd257 feat(auto update): add script to extract repology data from its api
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
4af1102029 feat(auto update): add script to update repology tracked packages
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
b518a1599b feat(auto update): add script to update gitlab hosted packages
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
6a061af281 feat(auto update): add script to update github hosted packages
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
03cc6b6ce8 feat(auto update): add utility function to check if update is needed
- compare current and latest version retrived from respective api

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
2e093339b2 feat(auto update): add utility function to upgrade package's version
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
e1d6ab87f6 feat(auto update): add utility function to exit on error
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
b089c6182b feat(auto update): add script to decide update method
- hook to be called when auto updating.
- it may be overridden by build.sh

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Aditya Alok
bd99580451 refactor(update-packages): new auto-update system
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-28 23:11:11 +05:30
Tee KOBAYASHI
2a1524d67c ndk-patches: Don't declare sem_{open,close,unlink}
but instead declare `libandroid_sem_{open,close,unlink}` defined in
`libandroid-posix-semaphore`.
2022-03-26 00:02:59 +09:00
Tee KOBAYASHI
a860a7dc20 golang: Update to 1.18 2022-03-23 10:13:33 +09:00
Aditya Alok
64535d4ac3
fix(haskell packages): do not delete lib/ghc-* directory for ghc and ghc-libs package itself
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-22 21:39:04 +01:00
Henrik Grimler
3a7bb54376
termux_setup_nodejs: fix check for cached nodejs 2022-03-20 22:11:57 +01:00
Aditya Alok
d11d6846e7
refactor(haskell-build): remove default-setup.hs
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:40 +01:00
Aditya Alok
52d7cc88d2
fix(setup ghc cross compiler): call __termux_haskell_register_packages after cross ghc setup
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:38 +01:00
Aditya Alok
0866d7b388
fix(setup ghc): create tmpdir in /tmp
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:35 +01:00
Aditya Alok
744c20a12d
refactor(setup ghc cross compiler): remove arch specific dirs
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:30 +01:00
Aditya Alok
7b0cf76bad
fix(setup ghc): typo in command termux_download
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:26 +01:00
Aditya Alok
6137422df7
fix(setup ghc cross compiler): run __termux_haskell_register_packages only when ghc has been setup
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:22 +01:00
Aditya Alok
a5f9e8199a
style: lint with shellcheck
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:20 +01:00
Aditya Alok
5dfa5ccbd0
fix(setup ghc cross compiler): did no registered haskell packages
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:17 +01:00
Aditya Alok
f21125b33a
feat(haskell build): export configure variables in setup toolchain step
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:15 +01:00
Aditya Alok
0590811415
fix(configure haskell build): remove runghc arg
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:10 +01:00
Aditya Alok
a9b411f577
feat(setup ghc cross): handle package registration
feat(termux_setup_ghc_cross_compiler): handle haskell packages registration

chore(termux_setup_ghc_cross_compiler): update checksum

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:07 +01:00
Aditya Alok
3c9ed52daf
feat(haskell build): adhere to new setup script
feat(termux_setup_jailbreak_cabal): use pre-compiled binary

chore(termux_setup_cabal): update checksum

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:32:04 +01:00
Aditya Alok
d47825a88c
feat(haskell build system): remove unwanted files/dirs before packaging
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>

fix(termux_step_massage): add `-r` option to `rm` command to delete dir

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>

wip
2022-03-16 15:32:01 +01:00
Aditya Alok
49c3e79513
feat(setup ghc cross compiler): make it work independently from other build steps
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:31:59 +01:00
Aditya Alok
0a47e01c4d
feat: setup ghc cross compiler during configure step
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:31:56 +01:00
Aditya Alok
6219a64f32
feat(build scripts): add configure script for haskell packages
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:31:51 +01:00
Aditya Alok
e492c145af
feat(setup ghc): use patched Cabal package
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-16 15:31:48 +01:00