Skip to content

Commit 79a0d99

Browse files
committed
Merge remote-tracking branch 'termux/master'
2 parents de57c89 + a4385d4 commit 79a0d99

863 files changed

Lines changed: 20254 additions & 19511 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/zram/action.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,26 @@ runs:
2121
shell: bash
2222
run: |
2323
set -euo pipefail
24-
KERNEL_VERSION="$(uname -r | grep -o "^[0-9\\.]*")"
24+
# We need to use the full kernel version instead of just the kernel version for caching the zram module as
25+
# GitHub Actions seems to have two different kernels with the same version but different patch versions
26+
# which are not compatible with each other.
27+
# For example 6.17.0-1010-azure and 6.17.0-1030-azure
28+
FULL_KERNEL_VERSION="$(uname -r)"
29+
KERNEL_VERSION="$(grep -o "^[0-9\\.]*" <<< "${FULL_KERNEL_VERSION}")"
2530
TAR_KERNEL_VERSION="${KERNEL_VERSION%\.0}"
2631
32+
echo "full_kernel_version=${FULL_KERNEL_VERSION}" >> "$GITHUB_OUTPUT"
2733
echo "kernel_version=${KERNEL_VERSION}" >> "$GITHUB_OUTPUT"
2834
echo "tar_version=${TAR_KERNEL_VERSION}" >> "$GITHUB_OUTPUT"
29-
echo "modules_dir=/lib/modules/$(uname -r)" >> "$GITHUB_OUTPUT"
35+
echo "modules_dir=/lib/modules/${FULL_KERNEL_VERSION}" >> "$GITHUB_OUTPUT"
3036
3137
- name: Restore cached zram kernel module
3238
id: cache-zram
3339
uses: actions/cache/restore@v5
3440
with:
3541
path: scripts/zram.ko.zst
36-
key: ${{ steps.kernel-info.outputs.kernel_version }}-${{ hashFiles('scripts/linux-kernel-signing-keys.gpg') }}-${{ hashFiles('.github/actions/zram/action.yml') }}
42+
# See above section where FULL_KERNEL_VERSION is declared for why we need to use full kernel version for caching the builds
43+
key: ${{ steps.kernel-info.outputs.full_kernel_version }}-${{ hashFiles('scripts/linux-kernel-signing-keys.gpg') }}-${{ hashFiles('.github/actions/zram/action.yml') }}
3744

3845
- name: Build zram kernel module
3946
if: steps.cache-zram.outputs.cache-hit != 'true'
@@ -69,7 +76,7 @@ runs:
6976
- name: Enable zram kernel module
7077
shell: bash
7178
run: |
72-
set -euo pipefail
79+
set -euov pipefail
7380
sudo cp scripts/zram.ko.zst ${{ steps.kernel-info.outputs.modules_dir }}/kernel/
7481
sudo depmod
7582
sudo modprobe zram

build-package.sh

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,15 +515,17 @@ _show_usage() {
515515
echo "Build a package by creating a .deb file in the output/ folder."
516516
echo
517517
echo "Available options:"
518-
[[ "$TERMUX_ON_DEVICE_BUILD" = "false" ]] && echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all."
518+
[[ "$TERMUX_ON_DEVICE_BUILD" == "false" ]] && echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all."
519519
echo " -c Continue previous build."
520520
echo " -C Cleanup already built packages on low disk space."
521521
echo " -d Build with debug symbols."
522522
echo " -D Build a disabled package in disabled-packages/."
523523
echo " -f Force build even if package has already been built."
524524
echo " -F Force build even if package and its dependencies have already been built."
525-
[[ "$TERMUX_ON_DEVICE_BUILD" = "false" ]] && echo " -i Download and extract dependencies instead of building them."
525+
[[ "$TERMUX_ON_DEVICE_BUILD" == "false" ]] && echo " -i Download and extract dependencies instead of building them."
526526
echo " -I Download and extract dependencies instead of building them, keep existing $TERMUX_BASE_DIR files."
527+
echo " -j <N> Number of threads. (default or 0, N = \`nproc\` = $(nproc))"
528+
echo " Can also be passed combined, e.g. '-j12'."
527529
echo " -L The package and its dependencies will be based on the same library."
528530
echo " -q Quiet build."
529531
echo " -Q Loud build -- set -x debug output and function tracing."
@@ -584,6 +586,21 @@ while (( $# )); do
584586
export TERMUX_INSTALL_DEPS=true
585587
export TERMUX_PKGS__BUILD__RM_ALL_PKGS_BUILT_MARKER_AND_INSTALL_FILES=false
586588
;;
589+
-j|-j[0-9]*)
590+
# If we got the 2 arg form discard the "-j".
591+
[[ "$1" == "-j" && "${2:-}" == [0-9]* ]] && shift 1
592+
# Check that -j's argument exists and is numeric.
593+
[[ -n "${1/-j}" && "${1/-j}" =~ ^[0-9]+$ ]] || termux_error_exit "./build-package.sh: option '-j' only takes integers"
594+
595+
# Assign the requested number of threads.
596+
# If the result is 0 or negative then default to `nproc`
597+
TERMUX_PKG_MAKE_PROCESSES="${1/-j}"
598+
if (( TERMUX_PKG_MAKE_PROCESSES < 1 )); then
599+
TERMUX_PKG_MAKE_PROCESSES="$(nproc)"
600+
fi
601+
602+
export TERMUX_PKG_MAKE_PROCESSES
603+
;;
587604
-L) export TERMUX_GLOBAL_LIBRARY=true;;
588605
-q) export TERMUX_QUIET_BUILD=true;;
589606
-Q) export PS4='+$0 \[\e[32m\]${FUNCNAME[0]:-<global scope>}${FUNCNAME[*]:+()}:$LINENO\[\e[0m\] '; set -x;;
@@ -632,7 +649,7 @@ if [[ -n "${TERMUX_PACKAGE_LIBRARY-}" ]]; then
632649
esac
633650
fi
634651

635-
if [[ "${TERMUX_INSTALL_DEPS-false}" = "true" || "${TERMUX_PACKAGE_LIBRARY-bionic}" = "glibc" ]]; then
652+
if [[ "${TERMUX_INSTALL_DEPS-false}" == "true" || "${TERMUX_PACKAGE_LIBRARY-bionic}" == "glibc" ]]; then
636653
# Setup PGP keys for verifying integrity of dependencies.
637654
# Keys are obtained from our keyring package.
638655
gpg --list-keys 2C7F29AE97891F6419A9E2CDB0076E490B71616B > /dev/null 2>&1 || {
@@ -776,7 +793,7 @@ for (( i=0; i < ${#PACKAGE_LIST[@]}; i++ )); do
776793
cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX_CLASSICAL"
777794
termux_step_post_massage
778795
# At the final stage (when the package is archiving) it is better to use commands from the system
779-
if [[ "$TERMUX_ON_DEVICE_BUILD" = "false" ]]; then
796+
if [[ "$TERMUX_ON_DEVICE_BUILD" == "false" ]]; then
780797
export PATH="/usr/bin:$PATH"
781798
fi
782799
cd "$TERMUX_PKG_MASSAGEDIR"

disabled-packages/ceu-lang/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ TERMUX_PKG_REVISION=2
1010
TERMUX_PKG_SHA256=bc3417d7a2a568d33ea01097bdfab6d34bb89da4b6191c169140a21cfefa5301
1111
TERMUX_PKG_AUTO_UPDATE=false
1212
TERMUX_PKG_BUILD_IN_SRC=true
13-
TERMUX_PKG_BUILD_DEPENDS="lua53, lua53-lpeg"
14-
TERMUX_PKG_DEPENDS="lua53, lua53-lpeg, liblua53"
13+
TERMUX_PKG_DEPENDS="lua53, lua53-lpeg"
1514

1615
termux_step_post_get_source() {
1716
git fetch --unshallow

packages/2ping/build.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
TERMUX_PKG_HOMEPAGE=https://www.finnie.org/software/2ping/
22
TERMUX_PKG_DESCRIPTION="A bi-directional ping utility"
3-
TERMUX_PKG_LICENSE="GPL-2.0"
3+
TERMUX_PKG_LICENSE="MPL-2.0"
44
TERMUX_PKG_MAINTAINER="@termux"
5-
TERMUX_PKG_VERSION=4.5.1
6-
TERMUX_PKG_REVISION=5
7-
TERMUX_PKG_SRCURL=https://github.com/rfinnie/2ping/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
8-
TERMUX_PKG_SHA256=0f85dc21be1266daccfbba903819ca8935ebdbe002b1e0305bfda258af44fdcd
9-
TERMUX_PKG_DEPENDS="python"
5+
TERMUX_PKG_VERSION=4.6.1
6+
TERMUX_PKG_SRCURL="https://github.com/rfinnie/2ping/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
7+
TERMUX_PKG_SHA256=c8352b6653c3194af1f869107655df3f98ab18b560e8bce86eabac08d73c72eb
8+
TERMUX_PKG_DEPENDS="python, python-pip"
9+
TERMUX_PKG_PYTHON_COMMON_BUILD_DEPS="wheel"
1010
TERMUX_PKG_PLATFORM_INDEPENDENT=true
1111
TERMUX_PKG_BUILD_IN_SRC=true
12-
TERMUX_PKG_PYTHON_COMMON_BUILD_DEPS="wheel"
12+
TERMUX_PKG_AUTO_UPDATE=true
1313

1414
termux_step_post_make_install() {
15-
install -Dm600 -t $TERMUX_PREFIX/share/man/man1 doc/2ping.1
15+
install -Dm600 -t "$TERMUX_PREFIX/share/man/man1" doc/2ping.1
1616
}

packages/agate/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ TERMUX_PKG_DESCRIPTION="Very simple server for the Gemini hypertext protocol"
33
TERMUX_PKG_LICENSE="MIT, Apache-2.0"
44
TERMUX_PKG_LICENSE_FILE="LICENSE-MIT, LICENSE-APACHE"
55
TERMUX_PKG_MAINTAINER="@termux"
6-
TERMUX_PKG_VERSION="3.3.22"
6+
TERMUX_PKG_VERSION="3.3.23"
77
TERMUX_PKG_SRCURL=https://github.com/mbrubeck/agate/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
8-
TERMUX_PKG_SHA256=7fc67b7a1620cdc3d62f629dfd25e4c7eb28325f9ba6a7e95d36e633de286d0d
8+
TERMUX_PKG_SHA256=b88dd2f7adeecef209675fbf83962a553dbf44441cb6cf8b8b094e0f0d55286d
99
TERMUX_PKG_AUTO_UPDATE=true
1010
TERMUX_PKG_BUILD_IN_SRC=true
1111

packages/agg/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE="https://github.com/asciinema/agg"
22
TERMUX_PKG_DESCRIPTION="asciinema gif generator"
33
TERMUX_PKG_LICENSE="Apache-2.0"
44
TERMUX_PKG_MAINTAINER="@termux"
5-
TERMUX_PKG_VERSION="1.8.1"
5+
TERMUX_PKG_VERSION="1.9.0"
66
TERMUX_PKG_SRCURL="https://github.com/asciinema/agg/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
7-
TERMUX_PKG_SHA256=9a2a7e6ca2748befb6a4c1c3eff437ae6029fde99ec882a951b3671aa30eacdb
7+
TERMUX_PKG_SHA256=8170119502ad2c1c697e5cd4d050d87c425ecee726c5f6c3c2140703bcb31bb3
88
TERMUX_PKG_AUTO_UPDATE=true
99
TERMUX_PKG_RECOMMENDS="asciinema"
1010
TERMUX_PKG_BUILD_IN_SRC=true

packages/algernon/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://algernon.roboticoverlords.org/
22
TERMUX_PKG_DESCRIPTION="Small self-contained web server with Lua, Markdown, QUIC, Redis and PostgreSQL support"
33
TERMUX_PKG_LICENSE="BSD 3-Clause"
44
TERMUX_PKG_MAINTAINER="@termux"
5-
TERMUX_PKG_VERSION="1.17.6"
5+
TERMUX_PKG_VERSION="1.17.9"
66
TERMUX_PKG_SRCURL="https://github.com/xyproto/algernon/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz"
7-
TERMUX_PKG_SHA256=9e95d59c0d821e06b7193a115447bd16cd8bfa077538237a17bf508053ef15bb
7+
TERMUX_PKG_SHA256=4466f10bbbe278eb79dea571c040e16b154dacca83c736b7c3f8474f5e17f110
88
TERMUX_PKG_AUTO_UPDATE=true
99

1010
termux_step_make() {

packages/algernon/fix-hardcoded-paths.patch

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/engine/config.go
22
+++ b/engine/config.go
3-
@@ -154,7 +154,7 @@
3+
@@ -188,7 +188,7 @@
44

55
// New creates a new server configuration based using the default values
66
func New(versionString, description string) (*Config, error) {
@@ -9,16 +9,16 @@
99
ac := &Config{
1010
curlSupport: true,
1111

12-
@@ -187,7 +187,7 @@
13-
defaultLuaDataFilename: "data.lua",
12+
@@ -222,7 +222,7 @@
13+
defaultLogFile: filepath.Join(tmpdir, "algernon.log"),
1414

1515
// List of configuration filenames to check
1616
- serverConfigurationFilenames: []string{"/etc/algernon/serverconf.lua", "/etc/algernon/server.lua"},
1717
+ serverConfigurationFilenames: []string{"@TERMUX_PREFIX@/etc/algernon/serverconf.lua", "@TERMUX_PREFIX@/etc/algernon/server.lua"},
1818

1919
// Compression speed over compactness
2020
cacheCompressionSpeed: true,
21-
@@ -218,7 +218,7 @@
21+
@@ -254,7 +254,7 @@
2222
return nil, err
2323
}
2424
// Read in the mimetype information from the system. Set UTF-8 when setting Content-Type.
@@ -29,33 +29,33 @@
2929
// File stat cache
3030
--- a/engine/flags.go
3131
+++ b/engine/flags.go
32-
@@ -206,9 +206,9 @@
32+
@@ -230,9 +230,9 @@
3333
switch {
3434
case ac.productionMode:
3535
// Use system directories
3636
- ac.serverDirOrFilename = "/srv/algernon"
37-
- ac.serverCert = "/etc/algernon/cert.pem"
38-
- ac.serverKey = "/etc/algernon/key.pem"
37+
- ac.serve.serverCert = "/etc/algernon/cert.pem"
38+
- ac.serve.serverKey = "/etc/algernon/key.pem"
3939
+ ac.serverDirOrFilename = "@TERMUX_PREFIX@/var/lib/algernon"
40-
+ ac.serverCert = "@TERMUX_PREFIX@/etc/algernon/cert.pem"
41-
+ ac.serverKey = "@TERMUX_PREFIX@/etc/algernon/key.pem"
40+
+ ac.serve.serverCert = "@TERMUX_PREFIX@/etc/algernon/cert.pem"
41+
+ ac.serve.serverKey = "@TERMUX_PREFIX@/etc/algernon/key.pem"
4242
ac.cacheMode = cachemode.Production
4343
ac.serverMode = true
4444
case ac.devMode:
4545
--- a/engine/serve.go
4646
+++ b/engine/serve.go
47-
@@ -167,7 +167,7 @@
48-
// If $XDG_CONFIG_DIR is not set, use $HOME.
49-
// If $HOME is not set, use $TMPDIR.
50-
// If $TMPDIR is not set, use /tmp.
51-
- certStorageDir := env.StrAlt("XDG_CONFIG_DIR", "HOME", env.Str("TMPDIR", "/tmp"))
52-
+ certStorageDir := env.StrAlt("XDG_CONFIG_DIR", "HOME", env.Str("TMPDIR", "@TERMUX_PREFIX@/tmp"))
53-
54-
defaultEmail := env.Str("LOGNAME", "root") + "@localhost"
55-
if len(ac.certMagicDomains) > 0 {
47+
@@ -132,7 +132,7 @@
48+
// configureCertMagic sets CertMagic package-level defaults from ac.
49+
// If $XDG_CONFIG_DIR is not set, uses $HOME, then $TMPDIR, then /tmp for cert storage.
50+
func (ac *Config) configureCertMagic() {
51+
- certStorageDir := env.StrAlt("XDG_CONFIG_DIR", "HOME", env.Str("TMPDIR", "/tmp"))
52+
+ certStorageDir := env.StrAlt("XDG_CONFIG_DIR", "HOME", env.Str("TMPDIR", "@TERMUX_PREFIX@/tmp"))
53+
defaultEmail := env.StrAlt("LOGNAME", "USER", "root") + "@localhost"
54+
if len(ac.serve.certMagicDomains) > 0 {
55+
defaultEmail = "webmaster@" + ac.serve.certMagicDomains[0]
5656
--- a/vendor/github.com/caddyserver/certmagic/dnsutil.go
5757
+++ b/vendor/github.com/caddyserver/certmagic/dnsutil.go
58-
@@ -339,4 +339,4 @@
58+
@@ -376,4 +376,4 @@
5959
fqdnSOACacheMu sync.Mutex
6060
)
6161

packages/alsa-lib/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.alsa-project.org
22
TERMUX_PKG_DESCRIPTION="The Advanced Linux Sound Architecture (ALSA) - library"
33
TERMUX_PKG_LICENSE="LGPL-2.1"
44
TERMUX_PKG_MAINTAINER="@termux"
5-
TERMUX_PKG_VERSION="1.2.15.3"
5+
TERMUX_PKG_VERSION="1.2.16"
66
TERMUX_PKG_SRCURL="https://github.com/alsa-project/alsa-lib/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz"
7-
TERMUX_PKG_SHA256=7a3bee640f1c29fdfa3d1f922185929b546f012c27a73bbb6b424d12488c3c8e
7+
TERMUX_PKG_SHA256=bae5ee588685da7143c3f17c6e7d3e0ce4d139d9de8e59a5cab7c99f314ecfab
88
TERMUX_PKG_DEPENDS="libandroid-sysv-semaphore, libandroid-shmem"
99
TERMUX_PKG_AUTO_UPDATE=true
1010
TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"

0 commit comments

Comments
 (0)