Compare commits

..
1 Commits
Author SHA1 Message Date
Henrik Grimler 30054df3ee libcln: bump revision 2021-10-23 17:00:47 +02:00
332 changed files with 1813 additions and 5927 deletions
-1
View File
@@ -7,7 +7,6 @@ on:
jobs:
update-packages:
if: github.repository == 'termux/termux-packages'
runs-on: ubuntu-latest
steps:
- name: Clone repository
+60 -76
View File
@@ -9,11 +9,6 @@ on:
pull_request:
paths:
- 'packages/**'
workflow_dispatch:
inputs:
packages:
description: "A space-separated names of packages selected for rebuilding"
required: true
jobs:
build:
@@ -32,83 +27,72 @@ jobs:
fetch-depth: 1000
- name: Build
run: |
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
BASE_COMMIT=$(jq --raw-output .pull_request.base.sha "$GITHUB_EVENT_PATH")
OLD_COMMIT=$(jq --raw-output .commits[0].id "$GITHUB_EVENT_PATH")
HEAD_COMMIT=$(jq --raw-output .commits[-1].id "$GITHUB_EVENT_PATH")
if [ "$BASE_COMMIT" = "null" ]; then
if [ "$OLD_COMMIT" = "$HEAD_COMMIT" ]; then
# Single-commit push.
echo "Processing commit: ${HEAD_COMMIT}"
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${HEAD_COMMIT}")
else
# Multi-commit push.
OLD_COMMIT="${OLD_COMMIT}~1"
echo "Processing commit range: ${OLD_COMMIT}..${HEAD_COMMIT}"
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${OLD_COMMIT}" "${HEAD_COMMIT}")
fi
BASE_COMMIT=$(jq --raw-output .pull_request.base.sha "$GITHUB_EVENT_PATH")
OLD_COMMIT=$(jq --raw-output .commits[0].id "$GITHUB_EVENT_PATH")
HEAD_COMMIT=$(jq --raw-output .commits[-1].id "$GITHUB_EVENT_PATH")
if [ "$BASE_COMMIT" = "null" ]; then
if [ "$OLD_COMMIT" = "$HEAD_COMMIT" ]; then
# Single-commit push.
echo "Processing commit: ${HEAD_COMMIT}"
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${HEAD_COMMIT}")
else
# Pull requests.
echo "Processing pull request #$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH"): ${BASE_COMMIT}..HEAD"
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${BASE_COMMIT}" "HEAD")
# Multi-commit push.
OLD_COMMIT="${OLD_COMMIT}~1"
echo "Processing commit range: ${OLD_COMMIT}..${HEAD_COMMIT}"
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${OLD_COMMIT}" "${HEAD_COMMIT}")
fi
else
# Pull requests.
echo "Processing pull request #$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH"): ${BASE_COMMIT}..HEAD"
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${BASE_COMMIT}" "HEAD")
fi
mkdir -p ./artifacts ./debs
touch ./debs/.placeholder
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
# Process tag '%ci:no-build' that may be added as line to commit message.
# Forces CI to cancel current build with status 'passed'.
if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 "HEAD"); then
tar cf artifacts/debs-${{ matrix.target_arch }}.tar debs
echo "[!] Force exiting as tag '%ci:no-build' was applied to HEAD commit message."
exit 0
fi
# Build local Docker image if setup scripts were changed.
# Useful for pull requests submitting changes for both build environment and packages.
if grep -qP '^scripts/(Dockerfile|setup-ubuntu\.sh)$' <<< "$CHANGED_FILES"; then
echo "Detected changes for environment setup scripts. Building custom Docker image now."
cd ./scripts
docker build -t termux/package-builder:latest .
cd ..
fi
# Parse changed files and identify new packages and deleted packages.
# Create lists of those packages that will be passed to upload job for
# further processing.
while read -r file; do
if ! [[ $file == packages/* ]]; then
# This file does not belong to a package, so ignore it
continue
fi
if [[ $file =~ ^packages/([a-z0-9+-]*)/([a-z0-9+-]*).subpackage.sh$ ]]; then
# A subpackage was modified, check if it was deleted or just updated
pkg=${BASH_REMATCH[1]}
subpkg=${BASH_REMATCH[2]}
if [ ! -f "packages/${pkg}/${subpkg}.subpackage.sh" ]; then
echo "$subpkg" >> ./deleted_packages.txt
fi
elif [[ $file =~ ^packages/([a-z0-9+-]*)/.*$ ]]; then
# package, check if it was deleted or updated
pkg=${BASH_REMATCH[1]}
if [ ! -d "packages/${pkg}" ]; then
echo "$pkg" >> ./deleted_packages.txt
else
echo "$pkg" >> ./built_packages.txt
# If there are subpackages we want to create a list of those
# as well
for file in $(find "packages/${pkg}/" -maxdepth 1 -type f -name \*.subpackage.sh | sort); do
echo "$(basename "${file%%.subpackage.sh}")" >> ./built_subpackages.txt
done
fi
fi
done<<<${CHANGED_FILES}
else
for pkg in ${{ github.event.inputs.packages }}; do
echo "$pkg" >> ./built_packages.txt
for subpkg in $(find "packages/${pkg}/" -maxdepth 1 -type f -name \*.subpackage.sh | sort); do
echo "$(basename "${subpkg%%.subpackage.sh}")" >> ./built_subpackages.txt
done
done
# Process tag '%ci:no-build' that may be added as line to commit message.
# Forces CI to cancel current build with status 'passed'.
if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 "HEAD"); then
tar cf artifacts/debs-${{ matrix.target_arch }}.tar debs
echo "[!] Force exiting as tag '%ci:no-build' was applied to HEAD commit message."
exit 0
fi
# Build local Docker image if setup scripts were changed.
# Useful for pull requests submitting changes for both build environment and packages.
if grep -qP '^scripts/(Dockerfile|setup-ubuntu\.sh)$' <<< "$CHANGED_FILES"; then
echo "Detected changes for environment setup scripts. Building custom Docker image now."
cd ./scripts
docker build -t termux/package-builder:latest .
cd ..
fi
# Parse changed files and identify new packages and deleted packages.
# Create lists of those packages that will be passed to upload job for
# further processing.
while read -r file; do
if ! [[ $file == packages/* ]]; then
# This file does not belong to a package, so ignore it
continue
fi
if [[ $file =~ ^packages/([a-z0-9+-]*)/([a-z0-9+-]*).subpackage.sh$ ]]; then
# A subpackage was modified, check if it was deleted or just updated
pkg=${BASH_REMATCH[1]}
subpkg=${BASH_REMATCH[2]}
if [ ! -f "packages/${pkg}/${subpkg}.subpackage.sh" ]; then
echo "$subpkg" >> ./deleted_packages.txt
fi
elif [[ $file =~ ^packages/([a-z0-9+-]*)/.*$ ]]; then
# package, check if it was deleted or updated
pkg=${BASH_REMATCH[1]}
if [ ! -d "packages/${pkg}" ]; then
echo "$pkg" >> ./deleted_packages.txt
else
echo "$pkg" >> ./built_packages.txt
# If there are subpackages we want to create a list of those
# as well
for file in $(find "packages/${pkg}/" -maxdepth 1 -type f -name \*.subpackage.sh | sort); do
echo "$(basename "${file%%.subpackage.sh}")" >> ./built_subpackages.txt
done
fi
fi
done<<<${CHANGED_FILES}
# Fix so that lists do not contain duplicates
if [ -f ./built_packages.txt ]; then
+1 -1
View File
@@ -5,7 +5,7 @@
[![Docker image status](https://github.com/termux/termux-packages/workflows/Docker%20image/badge.svg)](https://hub.docker.com/r/termux/package-builder)
[![Repology metadata](https://github.com/termux/repology-metadata/workflows/Repology%20metadata/badge.svg)](https://repology.org/repository/termux)
[![Join the chat at https://gitter.im/termux/termux](https://badges.gitter.im/termux/termux.svg)](https://gitter.im/termux/termux)
[![Join the Termux discord server](https://img.shields.io/discord/641256914684084234.svg?label=&logo=discord&logoColor=ffffff&color=5865F2)](https://discord.gg/HXpF69X)
[![Join the Termux discord server](https://img.shields.io/discord/591914197219016707.svg?label=&logo=discord&logoColor=ffffff&color=5865F2)](https://discord.gg/HXpF69X)
<img src=".github/static/powered-by-fosshost.png" alt="Powered by FossHost" width="128px"></img>
-58
View File
@@ -1,58 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://bellard.org/tcc/
TERMUX_PKG_DESCRIPTION="Tiny C Compiler"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=1:0.9.27
TERMUX_PKG_REVISION=10
TERMUX_PKG_SRCURL=https://repo.or.cz/tinycc.git/snapshot/fef838db2d124db3f1357385972371ccba7af2c6.tar.gz
TERMUX_PKG_SHA256=f6a022994b9903485a1777540c0c9e0571990fc339a2b325be6127b616534f33
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_NO_STATICSPLIT=true
termux_step_configure() {
unset CFLAGS CXXFLAGS
if [ "${TERMUX_ARCH}" = "arm" ] || [ "${TERMUX_ARCH}" = "i686" ]; then
ELF_INTERPRETER_PATH="/system/bin/linker"
ANDROID_LIB_PATH="/system/lib:/system/vendor/lib"
else
ELF_INTERPRETER_PATH="/system/bin/linker64"
ANDROID_LIB_PATH="/system/lib64:/system/vendor/lib64"
fi
}
termux_step_make() {
(
unset CC CFLAGS LDFLAGS
./configure --prefix="/tmp/tcc.host" --cpu="${TERMUX_ARCH}"
make -j $TERMUX_MAKE_PROCESSES tcc
mv -f tcc tcc.host
make distclean
)
./configure \
--prefix="$TERMUX_PREFIX" \
--cross-prefix="${CC//clang}" \
--cc="clang" \
--cpu="$TERMUX_ARCH" \
--disable-rpath \
--elfinterp="$ELF_INTERPRETER_PATH" \
--crtprefix="$TERMUX_PREFIX/lib/tcc/crt" \
--sysincludepaths="$TERMUX_PREFIX/include:$TERMUX_PREFIX/lib/tcc/include" \
--libpaths="$TERMUX_PREFIX/lib:$TERMUX_PREFIX/lib/tcc:$ANDROID_LIB_PATH"
mv tcc.host tcc
touch -d "next minute" tcc
make -j ${TERMUX_MAKE_PROCESSES} libtcc1.a
rm -f tcc
make -j ${TERMUX_MAKE_PROCESSES} tcc
make install
for file in crtbegin_dynamic.o crtbegin_so.o crtend_android.o crtend_so.o; do
install -Dm600 \
"${TERMUX_STANDALONE_TOOLCHAIN}/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/$file" \
"${TERMUX_PREFIX}/lib/tcc/crt/$file"
done
}
@@ -1,25 +0,0 @@
diff -uNr tcc-0.9.27/libtcc.c tcc-0.9.27.mod/libtcc.c
--- tcc-0.9.27/libtcc.c 2017-12-17 10:27:05.000000000 +0200
+++ tcc-0.9.27.mod/libtcc.c 2018-08-09 19:25:44.086756864 +0300
@@ -974,9 +974,20 @@
/* add libc crt1/crti objects */
if ((output_type == TCC_OUTPUT_EXE || output_type == TCC_OUTPUT_DLL) &&
!s->nostdlib) {
- if (output_type != TCC_OUTPUT_DLL)
+
+#ifdef __ANDROID__
+ if (output_type != TCC_OUTPUT_DLL) {
+ tcc_add_crt(s, "crtbegin_dynamic.o");
+ } else {
+ tcc_add_crt(s, "crtbegin_so.o");
+ }
+#else
+ if (output_type != TCC_OUTPUT_DLL) {
tcc_add_crt(s, "crt1.o");
+ }
tcc_add_crt(s, "crti.o");
+#endif // __ANDROID__
+
}
#endif
return 0;
@@ -1,22 +0,0 @@
diff -uNr tcc-0.9.27/tccelf.c tcc-0.9.27.mod/tccelf.c
--- tcc-0.9.27/tccelf.c 2017-12-17 10:27:05.000000000 +0200
+++ tcc-0.9.27.mod/tccelf.c 2018-08-09 19:28:33.036752853 +0300
@@ -1202,8 +1202,17 @@
#endif
tcc_add_support(s1, TCC_LIBTCC1);
/* add crt end if not memory output */
- if (s1->output_type != TCC_OUTPUT_MEMORY)
+ if (s1->output_type != TCC_OUTPUT_MEMORY) {
+#ifdef __ANDROID__
+ if (s1->output_type == TCC_OUTPUT_DLL) {
+ tcc_add_crt(s1, "crtend_so.o");
+ } else {
+ tcc_add_crt(s1, "crtend_android.o");
+ }
+#else
tcc_add_crt(s1, "crtn.o");
+#endif
+ }
}
}
+2 -2
View File
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://algernon.roboticoverlords.org/
TERMUX_PKG_DESCRIPTION="Small self-contained web server with Lua, Markdown, QUIC, Redis and PostgreSQL support"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.12.14
TERMUX_PKG_VERSION=1.12.12
TERMUX_PKG_SRCURL=https://github.com/xyproto/algernon/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=cab5b01923142e0326ea2a01797814bb2e8ea9f7c6c41a3ea0ae7df3b667e86e
TERMUX_PKG_SHA256=6127eb975da960fd8aa7732c82f3b5e62d14ea763801778552bdbeec28846bf7
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
@@ -1,13 +0,0 @@
https://github.com/lib/pq/pull/1060
diff --git a/vendor/github.com/lib/pq/user_posix.go b/vendor/github.com/lib/pq/user_posix.go
index a510192..33bc5b7 100644
--- a/vendor/github.com/lib/pq/user_posix.go
+++ b/vendor/github.com/lib/pq/user_posix.go
@@ -1,6 +1,6 @@
// Package pq is a pure Go Postgres driver for the database/sql package.
-// +build aix darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris rumprun
+// +build aix darwin dragonfly freebsd linux,!android nacl netbsd openbsd plan9 solaris rumprun
package pq
+3 -2
View File
@@ -2,9 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://developer.android.com/
TERMUX_PKG_DESCRIPTION="Android platform tools"
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=31.0.3
TERMUX_PKG_VERSION=31.0.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/nmeum/android-tools/releases/download/$TERMUX_PKG_VERSION/android-tools-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=d7d2d945b6e1a7ba0c7d0b68a6d21ada6914155bf3ca02ff06c9db628ae6b029
TERMUX_PKG_SHA256=61b3bf6c240cb0b4d0ccfef696c55986e06657843627df950fdcf6881af0f8d4
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libc++, libusb, pcre2, googletest, libprotobuf, brotli, zstd, liblz4"
+334
View File
@@ -0,0 +1,334 @@
diff -uNr android-tools-31.0.2/vendor/adb/sysdeps.h android-tools-31.0.2.mod/vendor/adb/sysdeps.h
--- android-tools-31.0.2/vendor/adb/sysdeps.h 2021-07-20 11:13:01.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/adb/sysdeps.h 2021-10-08 09:55:05.170121003 +0000
@@ -514,7 +514,11 @@
}
static inline int adb_getlogin_r(char* buf, size_t bufsize) {
- return getlogin_r(buf, bufsize);
+ char* logname = getlogin();
+ if (!logname) return ENXIO;
+ if (strlen(logname) >= bufsize) return ERANGE;
+ strcpy(buf, logname);
+ return 0;
}
static inline int adb_read(borrowed_fd fd, void* buf, size_t len) {
diff -uNr android-tools-31.0.2/vendor/base/libs/androidfw/ResourceTypes.cpp android-tools-31.0.2.mod/vendor/base/libs/androidfw/ResourceTypes.cpp
--- android-tools-31.0.2/vendor/base/libs/androidfw/ResourceTypes.cpp 2021-05-28 20:48:32.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/base/libs/androidfw/ResourceTypes.cpp 2021-10-08 09:55:05.174121003 +0000
@@ -42,7 +42,7 @@
#include <utils/String16.h>
#include <utils/String8.h>
-#ifdef __ANDROID__
+#if 0
#include <binder/TextOutput.h>
#endif
diff -uNr android-tools-31.0.2/vendor/boringssl/crypto/CMakeLists.txt android-tools-31.0.2.mod/vendor/boringssl/crypto/CMakeLists.txt
--- android-tools-31.0.2/vendor/boringssl/crypto/CMakeLists.txt 2021-06-02 15:08:20.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/boringssl/crypto/CMakeLists.txt 2021-10-08 09:55:05.175121003 +0000
@@ -167,7 +167,7 @@
add_custom_command(
OUTPUT err_data.c
- COMMAND ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
+ COMMAND GOOS=linux GOARCH=amd64 ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
DEPENDS
err/err_data_generate.go
err/asn1.errordata
diff -uNr android-tools-31.0.2/vendor/CMakeLists.adb.txt android-tools-31.0.2.mod/vendor/CMakeLists.adb.txt
--- android-tools-31.0.2/vendor/CMakeLists.adb.txt 2021-06-02 15:20:44.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/CMakeLists.adb.txt 2021-10-08 09:55:05.167121003 +0000
@@ -192,7 +192,6 @@
brotlidec
brotlienc
lz4
- pthread
usb-1.0
z
zstd)
diff -uNr android-tools-31.0.2/vendor/CMakeLists.fastboot.txt android-tools-31.0.2.mod/vendor/CMakeLists.fastboot.txt
--- android-tools-31.0.2/vendor/CMakeLists.fastboot.txt 2021-07-15 11:17:07.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/CMakeLists.fastboot.txt 2021-10-08 09:55:05.168121003 +0000
@@ -135,4 +135,4 @@
target_link_libraries(fastboot
libsparse libzip libcutils liblog libfsmgr libutil
libbase libext4 libselinux libsepol libdiagnoseusb crypto
- z pcre2-8 pthread dl)
+ z pcre2-8 dl)
diff -uNr android-tools-31.0.2/vendor/CMakeLists.mke2fs.txt android-tools-31.0.2.mod/vendor/CMakeLists.mke2fs.txt
--- android-tools-31.0.2/vendor/CMakeLists.mke2fs.txt 2021-06-02 15:20:41.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/CMakeLists.mke2fs.txt 2021-10-08 09:55:05.169121003 +0000
@@ -112,6 +112,6 @@
e2fsprogs/misc/util.c)
target_link_libraries("${ANDROID_MKE2FS_NAME}"
- libext2fs libsparse libbase libzip liblog libutil pthread z)
+ libext2fs libsparse libbase libzip liblog libutil z)
target_include_directories("${ANDROID_MKE2FS_NAME}" PRIVATE
e2fsprogs/lib)
diff -uNr android-tools-31.0.2/vendor/core/fs_mgr/liblp/utility.cpp android-tools-31.0.2.mod/vendor/core/fs_mgr/liblp/utility.cpp
--- android-tools-31.0.2/vendor/core/fs_mgr/liblp/utility.cpp 2020-12-20 20:06:59.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/core/fs_mgr/liblp/utility.cpp 2021-10-08 09:55:05.176121003 +0000
@@ -34,7 +34,7 @@
#include <ext4_utils/ext4_utils.h>
#include <openssl/sha.h>
-#ifdef __ANDROID__
+#if 0
#include <cutils/android_get_control_file.h>
#endif
@@ -208,7 +208,7 @@
}
base::unique_fd GetControlFileOrOpen(std::string_view path, int flags) {
-#if defined(__ANDROID__)
+#if 0
int fd = android_get_control_file(path.data());
if (fd >= 0) {
int newfd = TEMP_FAILURE_RETRY(dup(fd));
diff -uNr android-tools-31.0.2/vendor/core/init/reboot.cpp android-tools-31.0.2.mod/vendor/core/init/reboot.cpp
--- android-tools-31.0.2/vendor/core/init/reboot.cpp 2021-07-20 11:13:01.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/core/init/reboot.cpp 2021-10-08 09:55:05.177121003 +0000
@@ -246,7 +246,7 @@
if (dump) {
LOG(INFO) << "mount entry " << mentry->mnt_fsname << ":" << mentry->mnt_dir << " opts "
<< mentry->mnt_opts << " type " << mentry->mnt_type;
- } else if (MountEntry::IsBlockDevice(*mentry) && hasmntopt(mentry, "rw")) {
+ } else if (MountEntry::IsBlockDevice(*mentry) && 0) {
std::string mount_dir(mentry->mnt_dir);
// These are R/O partitions changed to R/W after adb remount.
// Do not umount them as shutdown critical services may rely on them.
diff -uNr android-tools-31.0.2/vendor/core/libcutils/properties.cpp android-tools-31.0.2.mod/vendor/core/libcutils/properties.cpp
--- android-tools-31.0.2/vendor/core/libcutils/properties.cpp 2020-12-20 20:06:59.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/core/libcutils/properties.cpp 2021-10-08 09:55:05.178121003 +0000
@@ -91,7 +91,7 @@
return len;
}
-#if __has_include(<sys/system_properties.h>)
+#if 0
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
diff -uNr android-tools-31.0.2/vendor/e2fsprogs/lib/ext2fs/ismounted.c android-tools-31.0.2.mod/vendor/e2fsprogs/lib/ext2fs/ismounted.c
--- android-tools-31.0.2/vendor/e2fsprogs/lib/ext2fs/ismounted.c 2019-08-21 17:14:14.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/e2fsprogs/lib/ext2fs/ismounted.c 2021-10-08 09:55:05.178121003 +0000
@@ -196,7 +196,7 @@
#endif /* __GNU__ */
*mount_flags = EXT2_MF_MOUNTED;
-#ifdef MNTOPT_RO
+#if 0
/* Check to see if the ro option is set */
if (hasmntopt(mnt, MNTOPT_RO))
*mount_flags |= EXT2_MF_READONLY;
diff -uNr android-tools-31.0.2/vendor/f2fs-tools/lib/libf2fs.c android-tools-31.0.2.mod/vendor/f2fs-tools/lib/libf2fs.c
--- android-tools-31.0.2/vendor/f2fs-tools/lib/libf2fs.c 2020-12-20 12:53:55.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/f2fs-tools/lib/libf2fs.c 2021-10-08 09:55:05.179121003 +0000
@@ -714,7 +714,7 @@
while ((mnt = getmntent(file)) != NULL) {
if (!strcmp(device, mnt->mnt_fsname)) {
-#ifdef MNTOPT_RO
+#if 0
if (hasmntopt(mnt, MNTOPT_RO))
c.ro = 1;
#endif
diff -uNr android-tools-31.0.2/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h android-tools-31.0.2.mod/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
--- android-tools-31.0.2/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h 2021-07-20 11:13:01.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h 2021-10-08 10:01:07.304004004 +0000
@@ -23,6 +23,7 @@
#include <android-base/logging.h>
#include <android-base/off64_t.h>
+#undef __ANDROID__
#ifdef __ANDROID__
#include <linux/incrementalfs.h>
#endif
@@ -400,4 +401,4 @@
} // namespace incfs
-} // namespace android
\ No newline at end of file
+} // namespace android
diff -uNr android-tools-31.0.2/vendor/libbase/include/android-base/unique_fd.h android-tools-31.0.2.mod/vendor/libbase/include/android-base/unique_fd.h
--- android-tools-31.0.2/vendor/libbase/include/android-base/unique_fd.h 2020-11-12 18:02:33.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/libbase/include/android-base/unique_fd.h 2021-10-08 09:55:05.180121003 +0000
@@ -46,7 +46,7 @@
// unique_fd is also known as ScopedFd/ScopedFD/scoped_fd; mentioned here to help
// you find this class if you're searching for one of those names.
-#if defined(__BIONIC__)
+#if 0
#include <android/fdsan.h>
#endif
@@ -54,7 +54,7 @@
namespace base {
struct DefaultCloser {
-#if defined(__BIONIC__)
+#if 0
static void Tag(int fd, void* old_addr, void* new_addr) {
if (android_fdsan_exchange_owner_tag) {
uint64_t old_tag = android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_UNIQUE_FD,
diff -uNr android-tools-31.0.2/vendor/libbase/logging.cpp android-tools-31.0.2.mod/vendor/libbase/logging.cpp
--- android-tools-31.0.2/vendor/libbase/logging.cpp 2021-07-20 11:13:01.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/libbase/logging.cpp 2021-10-08 09:55:05.180121003 +0000
@@ -61,11 +61,17 @@
namespace android {
namespace base {
+#if defined(__linux__)
+extern "C" {
+extern char* __progname;
+}
+#endif
+
// BSD-based systems like Android/macOS have getprogname(). Others need us to provide one.
#if defined(__linux__) || defined(_WIN32)
static const char* getprogname() {
#if defined(__linux__)
- return program_invocation_short_name;
+ return __progname;
#elif defined(_WIN32)
static bool first = true;
static char progname[MAX_PATH] = {};
diff -uNr android-tools-31.0.2/vendor/libbase/properties.cpp android-tools-31.0.2.mod/vendor/libbase/properties.cpp
--- android-tools-31.0.2/vendor/libbase/properties.cpp 2020-11-12 18:02:33.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/libbase/properties.cpp 2021-10-08 09:55:05.181121003 +0000
@@ -16,7 +16,7 @@
#include "android-base/properties.h"
-#if defined(__BIONIC__)
+#if 0
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/system_properties.h>
#include <sys/_system_properties.h>
@@ -32,8 +32,6 @@
#include <android-base/parseint.h>
#include <android-base/strings.h>
-#if !defined(__BIONIC__)
-
#define PROP_VALUE_MAX 92
static std::map<std::string, std::string>& g_properties = *new std::map<std::string, std::string>;
@@ -63,8 +61,6 @@
return strlen(value);
}
-#endif
-
namespace android {
namespace base {
@@ -108,7 +104,7 @@
std::string GetProperty(const std::string& key, const std::string& default_value) {
std::string property_value;
-#if defined(__BIONIC__)
+#if 0
const prop_info* pi = __system_property_find(key.c_str());
if (pi == nullptr) return default_value;
@@ -134,7 +130,7 @@
return (__system_property_set(key.c_str(), value.c_str()) == 0);
}
-#if defined(__BIONIC__)
+#if 0
struct WaitForPropertyData {
bool done;
diff -uNr android-tools-31.0.2/vendor/libziparchive/zip_archive.cc android-tools-31.0.2.mod/vendor/libziparchive/zip_archive.cc
--- android-tools-31.0.2/vendor/libziparchive/zip_archive.cc 2021-06-02 15:08:21.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/libziparchive/zip_archive.cc 2021-10-08 09:55:05.182121003 +0000
@@ -39,7 +39,9 @@
#define lseek64 lseek
#endif
-#if defined(__BIONIC__)
+#undef __ANDROID__
+
+#if 0
#include <android/fdsan.h>
#endif
@@ -88,7 +90,7 @@
* of the string length into the hash table entry.
*/
-#if defined(__BIONIC__)
+#if 0
uint64_t GetOwnerTag(const ZipArchive* archive) {
return android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_ZIPARCHIVE,
reinterpret_cast<uint64_t>(archive));
@@ -102,7 +104,7 @@
central_directory(),
directory_map(),
num_entries(0) {
-#if defined(__BIONIC__)
+#if 0
if (assume_ownership) {
CHECK(mapped_zip.HasFd());
android_fdsan_exchange_owner_tag(mapped_zip.GetFileDescriptor(), 0, GetOwnerTag(this));
@@ -120,7 +122,7 @@
ZipArchive::~ZipArchive() {
if (close_file && mapped_zip.GetFileDescriptor() >= 0) {
-#if defined(__BIONIC__)
+#if 0
android_fdsan_close_with_tag(mapped_zip.GetFileDescriptor(), GetOwnerTag(this));
#else
close(mapped_zip.GetFileDescriptor());
diff -uNr android-tools-31.0.2/vendor/logging/liblog/logger_write.cpp android-tools-31.0.2.mod/vendor/logging/liblog/logger_write.cpp
--- android-tools-31.0.2/vendor/logging/liblog/logger_write.cpp 2021-07-20 11:13:01.000000000 +0000
+++ android-tools-31.0.2.mod/vendor/logging/liblog/logger_write.cpp 2021-10-08 09:55:05.183121003 +0000
@@ -39,6 +39,8 @@
#include "logger.h"
#include "uio.h"
+#undef __ANDROID__
+
#ifdef __ANDROID__
#include "logd_writer.h"
#include "pmsg_writer.h"
@@ -108,31 +110,6 @@
#endif
}
-#if defined(__linux__) || defined(_WIN32)
-static const char* getprogname() {
-#if defined(__linux__)
- return program_invocation_short_name;
-#elif defined(_WIN32)
- static bool first = true;
- static char progname[MAX_PATH] = {};
-
- if (first) {
- char path[PATH_MAX + 1];
- DWORD result = GetModuleFileName(nullptr, path, sizeof(path) - 1);
- if (result == 0 || result == sizeof(path) - 1) return "";
- path[PATH_MAX - 1] = 0;
-
- char* path_basename = basename(path);
-
- snprintf(progname, sizeof(progname), "%s", path_basename);
- first = false;
- }
-
- return progname;
-#endif
-}
-#endif
-
// It's possible for logging to happen during static initialization before our globals are
// initialized, so we place this std::string in a function such that it is initialized on the first
// call. We use a pointer to avoid exit time destructors.
@@ -1,12 +0,0 @@
diff --git a/vendor/CMakeLists.adb.txt b/vendor/CMakeLists.adb.txt
index 2b6d8f0..ee55949 100644
--- a/vendor/CMakeLists.adb.txt
+++ b/vendor/CMakeLists.adb.txt
@@ -192,7 +192,6 @@ target_link_libraries(adb
brotlidec
brotlienc
lz4
- pthread
usb-1.0
z
zstd)
@@ -1,10 +0,0 @@
diff --git a/vendor/CMakeLists.fastboot.txt b/vendor/CMakeLists.fastboot.txt
index 1d43937..189d91b 100644
--- a/vendor/CMakeLists.fastboot.txt
+++ b/vendor/CMakeLists.fastboot.txt
@@ -135,4 +135,4 @@ target_compile_definitions(fastboot PRIVATE
target_link_libraries(fastboot
libsparse libzip libcutils liblog libfsmgr libutil
libbase libext4 libselinux libsepol libdiagnoseusb crypto
- z pcre2-8 pthread dl)
+ z pcre2-8 dl)
@@ -1,12 +0,0 @@
diff --git a/vendor/CMakeLists.mke2fs.txt b/vendor/CMakeLists.mke2fs.txt
index a8f89fd..d1cae40 100644
--- a/vendor/CMakeLists.mke2fs.txt
+++ b/vendor/CMakeLists.mke2fs.txt
@@ -112,6 +112,6 @@ add_executable("${ANDROID_MKE2FS_NAME}"
e2fsprogs/misc/util.c)
target_link_libraries("${ANDROID_MKE2FS_NAME}"
- libext2fs libsparse libbase libzip liblog libutil pthread z)
+ libext2fs libsparse libbase libzip liblog libutil z)
target_include_directories("${ANDROID_MKE2FS_NAME}" PRIVATE
e2fsprogs/lib)
@@ -1,93 +0,0 @@
diff --git a/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h b/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h
index 83f40a9..9804b76 100644
--- a/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h
+++ b/vendor/adb/pairing_auth/include/adb/pairing/pairing_auth.h
@@ -53,7 +53,7 @@ typedef struct PairingAuthCtx PairingAuthCtx;
* @return a new PairingAuthCtx server instance. Caller is responsible for
* destroying the context via #pairing_auth_destroy.
*/
-PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(30);
+PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(24);
/**
* Creates a new PairingAuthCtx instance as the client.
@@ -64,14 +64,14 @@ PairingAuthCtx* pairing_auth_server_new(const uint8_t* pswd, size_t len) __INTRO
* @return a new PairingAuthCtx client instance. Caller is responsible for
* destroying the context via #pairing_auth_destroy.
*/
-PairingAuthCtx* pairing_auth_client_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(30);
+PairingAuthCtx* pairing_auth_client_new(const uint8_t* pswd, size_t len) __INTRODUCED_IN(24);
/**
* Destroys the PairingAuthCtx.
*
* @param ctx the PairingAuthCtx instance to destroy. Will abort if null.
*/
-void pairing_auth_destroy(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
+void pairing_auth_destroy(PairingAuthCtx* ctx) __INTRODUCED_IN(24);
/**
* Returns the exact size of the SPAKE2 msg.
@@ -82,7 +82,7 @@ void pairing_auth_destroy(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
* @param ctx the PairingAuthCtx instance. Will abort if null.
* @return the size of the SPAKE2 message in bytes. This is guaranteed to be > 0.
*/
-size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
+size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(24);
/**
* Writes the SPAKE2 message to exchange with the other party to |out_buf|.
@@ -96,7 +96,7 @@ size_t pairing_auth_msg_size(PairingAuthCtx* ctx) __INTRODUCED_IN(30);
* be have at least #pairing_auth_msg_size size. Will abort if
* out_buf is null.
*/
-void pairing_auth_get_spake2_msg(PairingAuthCtx* ctx, uint8_t* out_buf) __INTRODUCED_IN(30);
+void pairing_auth_get_spake2_msg(PairingAuthCtx* ctx, uint8_t* out_buf) __INTRODUCED_IN(24);
/**
* Processes the peer's |their_msg| and attempts to initialize the cipher for
@@ -117,7 +117,7 @@ void pairing_auth_get_spake2_msg(PairingAuthCtx* ctx, uint8_t* out_buf) __INTROD
* for more details on the SPAKE2 protocol.
*/
bool pairing_auth_init_cipher(PairingAuthCtx* ctx, const uint8_t* their_msg, size_t msg_len)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
/**
* Returns a safe buffer size for encrypting data of a certain size.
@@ -130,7 +130,7 @@ bool pairing_auth_init_cipher(PairingAuthCtx* ctx, const uint8_t* their_msg, siz
* @return the minimum buffer size, in bytes, to hold an encrypted message of size len. See
* #pairing_auth_encrypt for usage.
*/
-size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRODUCED_IN(30);
+size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRODUCED_IN(24);
/**
* Encrypts input data and writes the encrypted data into a user-provided buffer.
@@ -147,7 +147,7 @@ size_t pairing_auth_safe_encrypted_size(PairingAuthCtx* ctx, size_t len) __INTRO
* otherwise.
*/
bool pairing_auth_encrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inlen, uint8_t* outbuf,
- size_t* outlen) __INTRODUCED_IN(30);
+ size_t* outlen) __INTRODUCED_IN(24);
/**
* Returns a safe buffer size for decrypting data of a certain size.
@@ -162,7 +162,7 @@ bool pairing_auth_encrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inle
* #pairing_auth_decrypt for usage.
*/
size_t pairing_auth_safe_decrypted_size(PairingAuthCtx* ctx, const uint8_t* buf, size_t len)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
/**
* Decrypts input data and writes the decrypted data into a user-provided buffer.
@@ -180,7 +180,7 @@ size_t pairing_auth_safe_decrypted_size(PairingAuthCtx* ctx, const uint8_t* buf,
* otherwise.
*/
bool pairing_auth_decrypt(PairingAuthCtx* ctx, const uint8_t* inbuf, size_t inlen, uint8_t* outbuf,
- size_t* outlen) __INTRODUCED_IN(30);
+ size_t* outlen) __INTRODUCED_IN(24);
#ifdef __cplusplus
}
@@ -1,39 +0,0 @@
diff --git a/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h b/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h
index 8e63db7..f158015 100644
--- a/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h
+++ b/vendor/adb/pairing_connection/include/adb/pairing/pairing_connection.h
@@ -79,7 +79,7 @@ typedef void (*pairing_result_cb)(const PeerInfo*, int, void*);
// invoked. Otherwise, cb is guaranteed to be invoked, even if you
// destroy the ctx while in the pairing process.
bool pairing_connection_start(PairingConnectionCtx* ctx, int fd, pairing_result_cb cb, void* opaque)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
// Creates a new PairingConnectionCtx instance as the client.
//
@@ -98,7 +98,7 @@ PairingConnectionCtx* pairing_connection_client_new(const uint8_t* pswd, size_t
const PeerInfo* peer_info,
const uint8_t* x509_cert_pem, size_t x509_size,
const uint8_t* priv_key_pem, size_t priv_size)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
// Creates a new PairingConnectionCtx instance as the server.
//
@@ -117,14 +117,14 @@ PairingConnectionCtx* pairing_connection_server_new(const uint8_t* pswd, size_t
const PeerInfo* peer_info,
const uint8_t* x509_cert_pem, size_t x509_size,
const uint8_t* priv_key_pem, size_t priv_size)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
// Destroys the PairingConnectionCtx instance.
//
// It is safe to destroy the instance at any point in the pairing process.
//
// @param ctx the PairingConnectionCtx instance to destroy. Will abort if null.
-void pairing_connection_destroy(PairingConnectionCtx* ctx) __INTRODUCED_IN(30);
+void pairing_connection_destroy(PairingConnectionCtx* ctx) __INTRODUCED_IN(24);
#ifdef __cplusplus
}
@@ -1,46 +0,0 @@
diff --git a/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h b/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h
index babff94..93dcf9a 100644
--- a/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h
+++ b/vendor/adb/pairing_connection/include/adb/pairing/pairing_server.h
@@ -45,7 +45,7 @@ typedef struct PairingServerCtx PairingServerCtx;
// Callback containing the result of the pairing. If #PeerInfo is null,
// then the pairing failed. Otherwise, pairing succeeded and #PeerInfo
// contains information about the peer.
-typedef void (*pairing_server_result_cb)(const PeerInfo*, void*) __INTRODUCED_IN(30);
+typedef void (*pairing_server_result_cb)(const PeerInfo*, void*) __INTRODUCED_IN(24);
// Starts the pairing server.
//
@@ -61,7 +61,7 @@ typedef void (*pairing_server_result_cb)(const PeerInfo*, void*) __INTRODUCED_IN
// @param opaque the opaque userdata.
// @return the port number the server is listening on. Returns 0 on failure.
uint16_t pairing_server_start(PairingServerCtx* ctx, pairing_server_result_cb cb, void* opaque)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
// Creates a new PairingServerCtx instance.
//
@@ -83,7 +83,7 @@ uint16_t pairing_server_start(PairingServerCtx* ctx, pairing_server_result_cb cb
PairingServerCtx* pairing_server_new(const uint8_t* pswd, size_t pswd_len,
const PeerInfo* peer_info, const uint8_t* x509_cert_pem,
size_t x509_size, const uint8_t* priv_key_pem,
- size_t priv_size, uint16_t port) __INTRODUCED_IN(30);
+ size_t priv_size, uint16_t port) __INTRODUCED_IN(24);
// Same as #pairing_server_new, except that the x509 certificate and private key
// is generated internally.
@@ -100,12 +100,12 @@ PairingServerCtx* pairing_server_new(const uint8_t* pswd, size_t pswd_len,
// for destroying the context via #pairing_server_destroy.
PairingServerCtx* pairing_server_new_no_cert(const uint8_t* pswd, size_t pswd_len,
const PeerInfo* peer_info, uint16_t port)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
// Destroys the PairingServerCtx instance.
//
// @param ctx the PairingServerCtx instance to destroy.
-void pairing_server_destroy(PairingServerCtx* ctx) __INTRODUCED_IN(30);
+void pairing_server_destroy(PairingServerCtx* ctx) __INTRODUCED_IN(24);
#ifdef __cplusplus
}
@@ -1,17 +0,0 @@
diff --git a/vendor/adb/sysdeps.h b/vendor/adb/sysdeps.h
index 316afe7..8d5da69 100644
--- a/vendor/adb/sysdeps.h
+++ b/vendor/adb/sysdeps.h
@@ -514,7 +514,11 @@ static inline int adb_gethostname(char* name, size_t len) {
}
static inline int adb_getlogin_r(char* buf, size_t bufsize) {
- return getlogin_r(buf, bufsize);
+ char* logname = getlogin();
+ if (!logname) return ENXIO;
+ if (strlen(logname) >= bufsize) return ERANGE;
+ strcpy(buf, logname);
+ return 0;
}
static inline int adb_read(borrowed_fd fd, void* buf, size_t len) {
@@ -1,13 +0,0 @@
diff --git a/vendor/base/libs/androidfw/ResourceTypes.cpp b/vendor/base/libs/androidfw/ResourceTypes.cpp
index 2233827..bc5e9e2 100644
--- a/vendor/base/libs/androidfw/ResourceTypes.cpp
+++ b/vendor/base/libs/androidfw/ResourceTypes.cpp
@@ -42,7 +42,7 @@
#include <utils/String16.h>
#include <utils/String8.h>
-#ifdef __ANDROID__
+#if 0
#include <binder/TextOutput.h>
#endif
@@ -1,13 +0,0 @@
diff --git a/vendor/boringssl/crypto/CMakeLists.txt b/vendor/boringssl/crypto/CMakeLists.txt
index cde92b5..e25871c 100644
--- a/vendor/boringssl/crypto/CMakeLists.txt
+++ b/vendor/boringssl/crypto/CMakeLists.txt
@@ -167,7 +167,7 @@ perlasm(test/trampoline-x86_64.${ASM_EXT} test/asm/trampoline-x86_64.pl)
add_custom_command(
OUTPUT err_data.c
- COMMAND ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
+ COMMAND GOOS=linux GOARCH=amd64 ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
DEPENDS
err/err_data_generate.go
err/asn1.errordata
@@ -1,22 +0,0 @@
diff --git a/vendor/core/fs_mgr/liblp/utility.cpp b/vendor/core/fs_mgr/liblp/utility.cpp
index d8e171b..31b34a5 100644
--- a/vendor/core/fs_mgr/liblp/utility.cpp
+++ b/vendor/core/fs_mgr/liblp/utility.cpp
@@ -34,7 +34,7 @@
#include <ext4_utils/ext4_utils.h>
#include <openssl/sha.h>
-#ifdef __ANDROID__
+#if 0
#include <cutils/android_get_control_file.h>
#endif
@@ -208,7 +208,7 @@ bool SetBlockReadonly(int fd, bool readonly) {
}
base::unique_fd GetControlFileOrOpen(std::string_view path, int flags) {
-#if defined(__ANDROID__)
+#if 0
int fd = android_get_control_file(path.data());
if (fd >= 0) {
int newfd = TEMP_FAILURE_RETRY(dup(fd));
@@ -1,13 +0,0 @@
diff --git a/vendor/core/init/reboot.cpp b/vendor/core/init/reboot.cpp
index 464746d..dadf811 100644
--- a/vendor/core/init/reboot.cpp
+++ b/vendor/core/init/reboot.cpp
@@ -246,7 +246,7 @@ static bool FindPartitionsToUmount(std::vector<MountEntry>* block_dev_partitions
if (dump) {
LOG(INFO) << "mount entry " << mentry->mnt_fsname << ":" << mentry->mnt_dir << " opts "
<< mentry->mnt_opts << " type " << mentry->mnt_type;
- } else if (MountEntry::IsBlockDevice(*mentry) && hasmntopt(mentry, "rw")) {
+ } else if (MountEntry::IsBlockDevice(*mentry) && 0) {
std::string mount_dir(mentry->mnt_dir);
// These are R/O partitions changed to R/W after adb remount.
// Do not umount them as shutdown critical services may rely on them.
@@ -1,13 +0,0 @@
diff --git a/vendor/core/libcutils/properties.cpp b/vendor/core/libcutils/properties.cpp
index 03f0496..11c4786 100644
--- a/vendor/core/libcutils/properties.cpp
+++ b/vendor/core/libcutils/properties.cpp
@@ -91,7 +91,7 @@ int property_get(const char* key, char* value, const char* default_value) {
return len;
}
-#if __has_include(<sys/system_properties.h>)
+#if 0
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
@@ -1,13 +0,0 @@
diff --git a/vendor/e2fsprogs/lib/ext2fs/ismounted.c b/vendor/e2fsprogs/lib/ext2fs/ismounted.c
index 6cd497d..dcdd4fd 100644
--- a/vendor/e2fsprogs/lib/ext2fs/ismounted.c
+++ b/vendor/e2fsprogs/lib/ext2fs/ismounted.c
@@ -196,7 +196,7 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file,
#endif /* __GNU__ */
*mount_flags = EXT2_MF_MOUNTED;
-#ifdef MNTOPT_RO
+#if 0
/* Check to see if the ro option is set */
if (hasmntopt(mnt, MNTOPT_RO))
*mount_flags |= EXT2_MF_READONLY;
@@ -1,13 +0,0 @@
diff --git a/vendor/f2fs-tools/lib/libf2fs.c b/vendor/f2fs-tools/lib/libf2fs.c
index 55fa391..cf2716c 100644
--- a/vendor/f2fs-tools/lib/libf2fs.c
+++ b/vendor/f2fs-tools/lib/libf2fs.c
@@ -714,7 +714,7 @@ static int is_mounted(const char *mpt, const char *device)
while ((mnt = getmntent(file)) != NULL) {
if (!strcmp(device, mnt->mnt_fsname)) {
-#ifdef MNTOPT_RO
+#if 0
if (hasmntopt(mnt, MNTOPT_RO))
c.ro = 1;
#endif
@@ -1,12 +0,0 @@
diff --git a/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h b/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
index 6fd38ee..bb62fd4 100644
--- a/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
+++ b/vendor/incremental_delivery/incfs/util/include/util/map_ptr.h
@@ -23,6 +23,7 @@
#include <android-base/logging.h>
#include <android-base/off64_t.h>
+#undef __ANDROID__
#ifdef __ANDROID__
#include <linux/incrementalfs.h>
#endif
@@ -1,22 +0,0 @@
diff --git a/vendor/libbase/include/android-base/unique_fd.h b/vendor/libbase/include/android-base/unique_fd.h
index 9ceb5db..bf6f5cc 100644
--- a/vendor/libbase/include/android-base/unique_fd.h
+++ b/vendor/libbase/include/android-base/unique_fd.h
@@ -46,7 +46,7 @@
// unique_fd is also known as ScopedFd/ScopedFD/scoped_fd; mentioned here to help
// you find this class if you're searching for one of those names.
-#if defined(__BIONIC__)
+#if 0
#include <android/fdsan.h>
#endif
@@ -54,7 +54,7 @@ namespace android {
namespace base {
struct DefaultCloser {
-#if defined(__BIONIC__)
+#if 0
static void Tag(int fd, void* old_addr, void* new_addr) {
if (android_fdsan_exchange_owner_tag) {
uint64_t old_tag = android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_UNIQUE_FD,
@@ -1,53 +0,0 @@
diff --git a/vendor/libbase/properties.cpp b/vendor/libbase/properties.cpp
index 8190987..6d48ab8 100644
--- a/vendor/libbase/properties.cpp
+++ b/vendor/libbase/properties.cpp
@@ -16,7 +16,7 @@
#include "android-base/properties.h"
-#if defined(__BIONIC__)
+#if 0
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/system_properties.h>
#include <sys/_system_properties.h>
@@ -32,11 +32,9 @@
#include <android-base/parseint.h>
#include <android-base/strings.h>
-#if !defined(__BIONIC__)
-
#define PROP_VALUE_MAX 92
-static std::map<std::string, std::string>& g_properties = *new std::map<std::string, std::string>;
+static std::map<std::string, std::string> g_properties;
int __system_property_set(const char* key, const char* value) {
if (key == nullptr || *key == '\0') return -1;
@@ -63,8 +61,6 @@ int __system_property_get(const char* key, char* value) {
return strlen(value);
}
-#endif
-
namespace android {
namespace base {
@@ -108,7 +104,7 @@ template uint64_t GetUintProperty(const std::string&, uint64_t, uint64_t);
std::string GetProperty(const std::string& key, const std::string& default_value) {
std::string property_value;
-#if defined(__BIONIC__)
+#if 0
const prop_info* pi = __system_property_find(key.c_str());
if (pi == nullptr) return default_value;
@@ -134,7 +130,7 @@ bool SetProperty(const std::string& key, const std::string& value) {
return (__system_property_set(key.c_str(), value.c_str()) == 0);
}
-#if defined(__BIONIC__)
+#if 0
struct WaitForPropertyData {
bool done;
@@ -1,42 +0,0 @@
diff --git a/vendor/libziparchive/zip_archive.cc b/vendor/libziparchive/zip_archive.cc
index fe1baa1..21d2627 100644
--- a/vendor/libziparchive/zip_archive.cc
+++ b/vendor/libziparchive/zip_archive.cc
@@ -39,7 +39,9 @@
#define lseek64 lseek
#endif
-#if defined(__BIONIC__)
+#undef __ANDROID__
+
+#if 0
#include <android/fdsan.h>
#endif
@@ -88,7 +90,7 @@ static constexpr uint64_t kMaxFileLength = 256 * static_cast<uint64_t>(1u << 30u
* of the string length into the hash table entry.
*/
-#if defined(__BIONIC__)
+#if 0
uint64_t GetOwnerTag(const ZipArchive* archive) {
return android_fdsan_create_owner_tag(ANDROID_FDSAN_OWNER_TYPE_ZIPARCHIVE,
reinterpret_cast<uint64_t>(archive));
@@ -102,7 +104,7 @@ ZipArchive::ZipArchive(MappedZipFile&& map, bool assume_ownership)
central_directory(),
directory_map(),
num_entries(0) {
-#if defined(__BIONIC__)
+#if 0
if (assume_ownership) {
CHECK(mapped_zip.HasFd());
android_fdsan_exchange_owner_tag(mapped_zip.GetFileDescriptor(), 0, GetOwnerTag(this));
@@ -120,7 +122,7 @@ ZipArchive::ZipArchive(const void* address, size_t length)
ZipArchive::~ZipArchive() {
if (close_file && mapped_zip.GetFileDescriptor() >= 0) {
-#if defined(__BIONIC__)
+#if 0
android_fdsan_close_with_tag(mapped_zip.GetFileDescriptor(), GetOwnerTag(this));
#else
close(mapped_zip.GetFileDescriptor());
@@ -1,112 +0,0 @@
diff --git a/vendor/logging/liblog/include/android/log.h b/vendor/logging/liblog/include/android/log.h
index 12de595..6742aa9 100644
--- a/vendor/logging/liblog/include/android/log.h
+++ b/vendor/logging/liblog/include/android/log.h
@@ -229,7 +229,7 @@ typedef void (*__android_aborter_function)(const char* abort_message);
*
* Available since API level 30.
*/
-void __android_log_write_log_message(struct __android_log_message* log_message) __INTRODUCED_IN(30);
+void __android_log_write_log_message(struct __android_log_message* log_message) __INTRODUCED_IN(24);
/**
* Sets a user defined logger function. All log messages sent to liblog will be set to the
@@ -241,7 +241,7 @@ void __android_log_write_log_message(struct __android_log_message* log_message)
*
* Available since API level 30.
*/
-void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(30);
+void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(24);
/**
* Writes the log message to logd. This is an __android_logger_function and can be provided to
@@ -251,7 +251,7 @@ void __android_log_set_logger(__android_logger_function logger) __INTRODUCED_IN(
*
* Available since API level 30.
*/
-void __android_log_logd_logger(const struct __android_log_message* log_message) __INTRODUCED_IN(30);
+void __android_log_logd_logger(const struct __android_log_message* log_message) __INTRODUCED_IN(24);
/**
* Writes the log message to stderr. This is an __android_logger_function and can be provided to
@@ -262,7 +262,7 @@ void __android_log_logd_logger(const struct __android_log_message* log_message)
* Available since API level 30.
*/
void __android_log_stderr_logger(const struct __android_log_message* log_message)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
/**
* Sets a user defined aborter function that is called for __android_log_assert() failures. This
@@ -273,7 +273,7 @@ void __android_log_stderr_logger(const struct __android_log_message* log_message
*
* Available since API level 30.
*/
-void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_IN(30);
+void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_IN(24);
/**
* Calls the stored aborter function. This allows for other logging libraries to use the same
@@ -284,7 +284,7 @@ void __android_log_set_aborter(__android_aborter_function aborter) __INTRODUCED_
*
* Available since API level 30.
*/
-void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(30);
+void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(24);
/**
* Sets android_set_abort_message() on device then aborts(). This is the default aborter.
@@ -295,7 +295,7 @@ void __android_log_call_aborter(const char* abort_message) __INTRODUCED_IN(30);
* Available since API level 30.
*/
void __android_log_default_aborter(const char* abort_message) __attribute__((noreturn))
-__INTRODUCED_IN(30);
+__INTRODUCED_IN(24);
/**
* Use the per-tag properties "log.tag.<tagname>" along with the minimum priority from
@@ -314,7 +314,7 @@ __INTRODUCED_IN(30);
*
* Available since API level 30.
*/
-int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INTRODUCED_IN(30);
+int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INTRODUCED_IN(24);
/**
* Use the per-tag properties "log.tag.<tagname>" along with the minimum priority from
@@ -335,7 +335,7 @@ int __android_log_is_loggable(int prio, const char* tag, int default_prio) __INT
* Available since API level 30.
*/
int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int default_prio)
- __INTRODUCED_IN(30);
+ __INTRODUCED_IN(24);
/**
* Sets the minimum priority that will be logged for this process.
@@ -346,7 +346,7 @@ int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int def
*
* Available since API level 30.
*/
-int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(30);
+int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(24);
/**
* Gets the minimum priority that will be logged for this process. If none has been set by a
@@ -357,7 +357,7 @@ int32_t __android_log_set_minimum_priority(int32_t priority) __INTRODUCED_IN(30)
*
* Available since API level 30.
*/
-int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(30);
+int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(24);
/**
* Sets the default tag if no tag is provided when writing a log message. Defaults to
@@ -368,7 +368,7 @@ int32_t __android_log_get_minimum_priority(void) __INTRODUCED_IN(30);
*
* Available since API level 30.
*/
-void __android_log_set_default_tag(const char* tag) __INTRODUCED_IN(30);
+void __android_log_set_default_tag(const char* tag) __INTRODUCED_IN(24);
#ifdef __cplusplus
}
@@ -1,13 +0,0 @@
diff --git a/vendor/logging/liblog/logger_write.cpp b/vendor/logging/liblog/logger_write.cpp
index a0153f8..8863f29 100644
--- a/vendor/logging/liblog/logger_write.cpp
+++ b/vendor/logging/liblog/logger_write.cpp
@@ -39,6 +39,8 @@
#include "logger.h"
#include "uio.h"
+#undef __ANDROID__
+
#ifdef __ANDROID__
#include "logd_writer.h"
#include "pmsg_writer.h"
+7 -3
View File
@@ -3,9 +3,9 @@ TERMUX_PKG_DESCRIPTION="Apache Portable Runtime Library"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.7.0
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://dlcdn.apache.org/apr/apr-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=e2e148f0b2e99b8e5c6caa09f6d4fb4dd3e83f744aa72a952f94f5a14436f7ea
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://ftp.acc.umu.se/mirror/apache.org/apr/apr-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=48e9dbf45ae3fdc7b491259ffb6ccf7d63049ffacbc1c0977cced095e4c2d5a2
TERMUX_PKG_DEPENDS="libuuid"
TERMUX_PKG_BREAKS="apr-dev"
TERMUX_PKG_REPLACES="apr-dev"
@@ -22,3 +22,7 @@ apr_cv_tcp_nodelay_with_cork=yes
ac_cv_sizeof_struct_iovec=$(( TERMUX_ARCH_BITS==32 ? 8 : 16 ))
ac_cv_search_crypt="
TERMUX_PKG_RM_AFTER_INSTALL="lib/apr.exp"
termux_step_post_make_install() {
sed -i "s%NM=\".*%NM=\"${TERMUX_HOST_PLATFORM}-nm -B\"%g" $TERMUX_PREFIX/share/apr-1/build/libtool
}
-45
View File
@@ -1,45 +0,0 @@
https://github.com/Debian/apt/pull/136
diff --git a/apt-pkg/cachefilter-patterns.cc b/apt-pkg/cachefilter-patterns.cc
index 12d8ae748..7a3255f41 100644
--- a/apt-pkg/cachefilter-patterns.cc
+++ b/apt-pkg/cachefilter-patterns.cc
@@ -30,7 +30,7 @@ static const constexpr struct
{"c"_sv, "?config-files"_sv, false},
// FIXME: The words after ~D should be case-insensitive
{"DDepends:"_sv, "?depends"_sv, true},
- {"DPre-Depends:"_sv, "?pre-depends"_sv, true},
+ {"DPreDepends:"_sv, "?predepends"_sv, true},
{"DSuggests:"_sv, "?suggests"_sv, true},
{"DRecommends:"_sv, "?recommends"_sv, true},
{"DConflicts:"_sv, "?conflicts"_sv, true},
@@ -40,7 +40,7 @@ static const constexpr struct
{"DEnhances:"_sv, "?enhances"_sv, true},
{"D"_sv, "?depends"_sv, true},
{"RDepends:"_sv, "?reverse-depends"_sv, true},
- {"RPre-Depends:"_sv, "?reverse-pre-depends"_sv, true},
+ {"RPreDepends:"_sv, "?reverse-predepends"_sv, true},
{"RSuggests:"_sv, "?reverse-suggests"_sv, true},
{"RRecommends:"_sv, "?reverse-recommends"_sv, true},
{"RConflicts:"_sv, "?reverse-conflicts"_sv, true},
diff --git a/doc/apt-patterns.7.xml b/doc/apt-patterns.7.xml
index 6b1c0f20b..bbcf01138 100644
--- a/doc/apt-patterns.7.xml
+++ b/doc/apt-patterns.7.xml
@@ -161,14 +161,15 @@
<variablelist>
<varlistentry>
<term><code>?depends(PATTERN)</code></term><term><code>~DPATTERN</code></term>
- <term><code>?pre-depends(PATTERN)</code></term><term><code>~DPre-Depends:PATTERN</code></term>
+ <term><code>?predepends(PATTERN)</code></term><term><code>~DPreDepends:PATTERN</code></term>
<term><code>?suggests(PATTERN)</code></term><term><code>~DSuggests:PATTERN</code></term>
+ <term><code>?recommends(PATTERN)</code></term><term><code>~DRecommends:PATTERN</code></term>
<term><code>?conflicts(PATTERN)</code></term><term><code>~DConflicts:PATTERN</code></term>
<term><code>?replaces(PATTERN)</code></term><term><code>~DReplaces:PATTERN</code></term>
<term><code>?obsoletes(PATTERN)</code></term><term><code>~DObsoletes:PATTERN</code></term>
<term><code>?breaks(PATTERN)</code></term><term><code>~DBreaks:PATTERN</code></term>
<term><code>?enhances(PATTERN)</code></term><term><code>~DEnhances:PATTERN</code></term>
- <listitem><para>Selects versions depending/pre-depending/suggesting/conflicting/etc on/with/ packages matching PATTERN.</para></listitem>
+ <listitem><para>Selects versions depending/pre-depending/suggesting/recommending/conflicting/etc on/with/ packages matching PATTERN.</para></listitem>
</varlistentry>
<varlistentry>
<term><code>?reverse-<replaceable>depType</replaceable>(PATTERN)</code></term>
+4 -5
View File
@@ -3,17 +3,16 @@ TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.3.11
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=cc0c5b24240176e333b11bce1a7ac528ae263317d137ceeebad3ec2d8682cb91
# apt-key requires utilities from coreutils, findutils, gpgv, grep, sed.
TERMUX_PKG_DEPENDS="coreutils, dpkg, findutils, gpgv, grep, libandroid-glob, libbz2, libc++, libcurl, libgnutls, liblz4, liblzma, sed, termux-licenses, xxhash, zlib"
TERMUX_PKG_BUILD_DEPENDS="docbook-xsl"
TERMUX_PKG_CONFLICTS="apt-transport-https, libapt-pkg, unstable-repo"
TERMUX_PKG_REPLACES="apt-transport-https, libapt-pkg, unstable-repo"
TERMUX_PKG_PROVIDES="unstable-repo"
TERMUX_PKG_CONFLICTS="apt-transport-https, libapt-pkg"
TERMUX_PKG_REPLACES="apt-transport-https, libapt-pkg"
TERMUX_PKG_RECOMMENDS="game-repo, science-repo"
TERMUX_PKG_SUGGESTS="gnupg, x11-repo"
TERMUX_PKG_SUGGESTS="gnupg, unstable-repo, x11-repo"
TERMUX_PKG_ESSENTIAL=true
TERMUX_PKG_CONFFILES="
-43
View File
@@ -1,43 +0,0 @@
diff -uNr atomvm/src/CMakeLists.txt atomvm.mod/src/CMakeLists.txt
--- atomvm/src/CMakeLists.txt 2019-06-13 13:50:54.000000000 +0300
+++ atomvm.mod/src/CMakeLists.txt 2019-07-02 20:56:59.790369109 +0300
@@ -10,13 +10,14 @@
if((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") OR
(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR
+ (${CMAKE_SYSTEM_NAME} STREQUAL "Android") OR
(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"))
add_subdirectory(platforms/generic_unix)
else()
message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}")
endif()
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+if((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR (${CMAKE_SYSTEM_NAME} STREQUAL "Android"))
include(CheckFunctionExists)
include(CheckLibraryExists)
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
diff -uNr atomvm/src/libAtomVM/CMakeLists.txt atomvm.mod/src/libAtomVM/CMakeLists.txt
--- atomvm/src/libAtomVM/CMakeLists.txt 2019-06-13 13:50:54.000000000 +0300
+++ atomvm.mod/src/libAtomVM/CMakeLists.txt 2019-07-02 20:57:46.597379691 +0300
@@ -63,7 +63,7 @@
term.c
valueshashtable.c
)
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
find_package(ZLIB)
if (ZLIB_FOUND)
add_definitions(-DWITH_ZLIB)
diff -uNr atomvm/tests/CMakeLists.txt atomvm.mod/tests/CMakeLists.txt
--- atomvm/tests/CMakeLists.txt 2019-06-13 13:50:54.000000000 +0300
+++ atomvm.mod/tests/CMakeLists.txt 2019-07-02 20:55:37.143095702 +0300
@@ -13,7 +13,7 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR} ../src/libAtomVM/)
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+if((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR (${CMAKE_SYSTEM_NAME} STREQUAL "Android"))
include(CheckFunctionExists)
include(CheckLibraryExists)
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
-29
View File
@@ -1,29 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://github.com/bettio/AtomVM
TERMUX_PKG_DESCRIPTION="The minimal Erlang VM implementation"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
_COMMIT=82624fbf68ad8a0c8815456adbd33de98e4901ea
TERMUX_PKG_VERSION=0.git${_COMMIT:0:8}
TERMUX_PKG_REVISION=7
TERMUX_PKG_SRCURL=https://github.com/bettio/AtomVM/archive/${_COMMIT}.tar.gz
TERMUX_PKG_SHA256=b141812be3fe157766464b8fcedc13f40b36bc9346b3e039ac736c5d30359729
TERMUX_PKG_DEPENDS="zlib"
TERMUX_PKG_HOSTBUILD=true
termux_step_host_build() {
termux_setup_cmake
cmake "$TERMUX_PKG_SRCDIR"
make -j $TERMUX_MAKE_PROCESSES
}
termux_step_post_configure() {
# We need the "PackBEAM" compiled for host.
export PATH=$PATH:$TERMUX_PKG_HOSTBUILD_DIR/tools/packbeam
}
termux_step_make_install() {
install -Dm700 "$TERMUX_PKG_BUILDDIR"/src/AtomVM \
"$TERMUX_PREFIX"/bin/AtomVM
install -Dm700 "$TERMUX_PKG_BUILDDIR"/tools/packbeam/PackBEAM \
"$TERMUX_PREFIX"/bin/PackBEAM
}
-51
View File
@@ -1,51 +0,0 @@
diff -uNr atomvm/CMakeModules/BuildElixir.cmake atomvm.mod/CMakeModules/BuildElixir.cmake
--- atomvm/CMakeModules/BuildElixir.cmake 2019-06-13 13:50:54.000000000 +0300
+++ atomvm.mod/CMakeModules/BuildElixir.cmake 2019-07-02 18:26:59.146026706 +0300
@@ -24,7 +24,7 @@
add_custom_target(
${avm_name} ALL
DEPENDS ${avm_name}_beams PackBEAM
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM -a ${avm_name}.avm ${BEAMS}
+ COMMAND PackBEAM -a ${avm_name}.avm ${BEAMS}
COMMENT "Packing archive ${avm_name}.avm"
VERBATIM
)
@@ -55,7 +55,7 @@
add_custom_target(
${avm_name} ALL
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${avm_name}.avm Elixir.${main}.beam ${ARCHIVES}
+ COMMAND PackBEAM ${avm_name}.avm Elixir.${main}.beam ${ARCHIVES}
COMMENT "Packing runnable ${avm_name}.avm"
VERBATIM
)
diff -uNr atomvm/CMakeModules/BuildErlang.cmake atomvm.mod/CMakeModules/BuildErlang.cmake
--- atomvm/CMakeModules/BuildErlang.cmake 2019-06-13 13:50:54.000000000 +0300
+++ atomvm.mod/CMakeModules/BuildErlang.cmake 2019-07-02 18:26:27.599082112 +0300
@@ -25,7 +25,7 @@
${avm_name} ALL
DEPENDS ${avm_name}_beams PackBEAM
#DEPENDS ${BEAMS}
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM -a ${avm_name}.avm ${BEAMS}
+ COMMAND PackBEAM -a ${avm_name}.avm ${BEAMS}
COMMENT "Packing archive ${avm_name}.avm"
VERBATIM
)
@@ -56,7 +56,7 @@
add_custom_target(
${avm_name} ALL
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${avm_name}.avm ${main}.beam ${ARCHIVES}
+ COMMAND PackBEAM ${avm_name}.avm ${main}.beam ${ARCHIVES}
COMMENT "Packing runnable ${avm_name}.avm"
VERBATIM
)
@@ -77,7 +77,7 @@
add_custom_target(
${test_avm_name} ALL
COMMAND erlc -I ${CMAKE_SOURCE_DIR}/libs/include ${CMAKE_CURRENT_SOURCE_DIR}/tests.erl
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${CMAKE_CURRENT_BINARY_DIR}/${test_avm_name}.avm ${CMAKE_CURRENT_BINARY_DIR}/tests.beam ${ARCHIVES}
+ COMMAND PackBEAM ${CMAKE_CURRENT_BINARY_DIR}/${test_avm_name}.avm ${CMAKE_CURRENT_BINARY_DIR}/tests.beam ${ARCHIVES}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests.erl
COMMENT "Packing runnable ${test_avm_name}.avm"
VERBATIM
-20
View File
@@ -1,20 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://github.com/BLAKE3-team/BLAKE3/tree/master/b3sum
TERMUX_PKG_DESCRIPTION="A command line utility for calculating BLAKE3 hashes, similar to Coreutils tools like b2sum or md5sum"
TERMUX_PKG_LICENSE="CC0-1.0"
TERMUX_PKG_MAINTAINER="@medzikuser"
TERMUX_PKG_VERSION=1.1.0
TERMUX_PKG_SRCURL=https://github.com/BLAKE3-team/BLAKE3/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=0bfba4ba71a9b04afbaa6bfc45c38e0598ce404e2cc5094b1d4ef45e83db2ca1
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
termux_setup_rust
cd $TERMUX_PKG_SRCDIR/b3sum
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
}
termux_step_make_install() {
install -Dm755 -t $TERMUX_PREFIX/bin $TERMUX_PKG_SRCDIR/b3sum/target/${CARGO_TARGET_NAME}/release/b3sum
}
-143
View File
@@ -1,143 +0,0 @@
diff -uNr bftpd/bftpd.conf bftpd.mod/bftpd.conf
--- bftpd/bftpd.conf 2019-07-28 20:07:32.000000000 +0300
+++ bftpd.mod/bftpd.conf 2020-07-24 17:49:21.832372999 +0300
@@ -9,7 +9,7 @@
DENY_LOGIN="no"
#The port number where the daemon should listen (only for daemon mode)
- PORT="21"
+ PORT="8021"
#You can force bftpd to use a specific port range in passive mode.
#Passive mode means that the client will open data connections
@@ -34,26 +34,6 @@
#The password for the administration commands, encrypted (man mkpasswd).
ADMIN_PASS="x"
- #With this option, you can put your entire FTP environment into a chroot
- #jail. Apart from security, this offers you the possibility of having
- #virtual users that don't exist in the system.
- #Additionally, you can make some kind of 'file pool' by creating a directory
- #with files which you can symlink from the users' homes (this means setting
- #DO_CHROOT=no in order for the users to be able to access that dir.
- #Note that you need the following files in your initial chroot directory:
- #/etc/passwd, /etc/shadow, /etc/group
- #On GNU systems, you will also need the NSS libraries in /lib.
- #INITIAL_CHROOT="/ftp"
-
- #The bftpdutmp file enables you to record user logins and logouts in
- #bftpd, which is useful for the administration interface (which is not
- #finished yet). You also need the file to be able to restrict the number
- #of users simultaneously logged on, and so on.
- #Note that the directory in which the file resides must already exist.
- #Set the option to "" if you do not want that. This is discouraged for normal
- #use, but can be helpful if you want to create a boot floppy or something.
- PATH_BFTPDUTMP="/var/run/bftpd/bftpdutmp"
-
#This option controls the buffer size while transferring files.
#If you are on a very fast network (fast meaning 100 Mbit/s or more),
#you should set this to 64000 or something like that.
@@ -66,7 +46,6 @@
# can slow transfer speeds.
XFER_BUFSIZE="2048"
-
# This variable controls whether the transfer buffer (see above option)
# should change size as more (or less) clients connect to the server.
# Setting this option to "yes" will put more work on your CPU, but
@@ -75,8 +54,6 @@
# your bandwidth to spike.
CHANGE_BUFSIZE="no"
-
-
# This option allows you to add a delay (in microseconds) to
# the time between when one piece of data was sent
# and when the next will be sent. This is to aid in
@@ -130,7 +107,7 @@
# be saved.
# Each day gets its own log file, to make it easier to rotate logs.
# Please note, this directory must be created manually.
- # BANDWIDTH="/var/log/bftpd"
+ # BANDWIDTH="@TERMUX_PREFIX@/var/log/bftpd"
#ROOTDIR specifies the root directory of the client. It defaults to %h
#(user's home directory). %u is replaced by the user name.
@@ -141,7 +118,7 @@
#Name of the log file. Say "syslog" to log into syslog.
#Say "" for no logging.
- LOGFILE="/var/log/bftpd.log"
+ LOGFILE="@TERMUX_PREFIX@/var/log/bftpd.log"
#Use %v for version, %h for the server FQDN and %i for the server IP address.
# Note: If you use the "%h" option and you do an inital CHROOT, then
@@ -152,7 +129,8 @@
#The server automatically chdirs to the directory given here after login.
AUTO_CHDIR="/"
- #Authentication type, values: PAM, PASSWD
+ #Authentication type, values: PASSWD
+ # PAM is not supported in Termux.
AUTH="PASSWD"
# The FILE_AUTH varible over-rides the AUTH value. If the FILE_AUTH
@@ -175,7 +153,7 @@
# where normal user accounts cannot be created.
# Under no circumstances should anyone except root be
# able to read the FILE_AUTH password file.
- #FILE_AUTH="/etc/ftpdpassword"
+ #FILE_AUTH="@TERMUX_PREFIX@/etc/ftpdpassword"
#Enable this if you want the client's IP address to be resolved to a host
@@ -185,7 +163,7 @@
RESOLVE_CLIENT_IP="no"
#Path to the message of the day, seen by all users before login.
- MOTD_GLOBAL="/etc/ftpmotd"
+ MOTD_GLOBAL="@TERMUX_PREFIX@/etc/ftpmotd"
#Path to the message of the day, seen after login, relative to the root
#path of the user (see ROOTDIR).
@@ -201,9 +179,6 @@
#want to have a security hole!
DO_CHROOT="yes"
- #Enable this to log each login to wtmp.
- LOG_WTMP="yes"
-
#If you want bftpd to bind itself to one specific network interface, enter
#its IP address here. Else enter 'any'. This option only works in standalone
#mode.
@@ -221,11 +196,7 @@
#Path to the ftpusers file. It can contain user names that are denied.
#If it does not exist, every user can log in. If you don't want this,
#just put a nonexistent filename here.
- PATH_FTPUSERS="/etc/ftpusers"
-
- #Enable this if you want to deny any user who has a shell which is not in
- #/etc/shells.
- AUTH_ETCSHELLS="no"
+ PATH_FTPUSERS="@TERMUX_PREFIX@/etc/ftpusers"
#With the option ALLOWCOMMAND_XXXX, you can disable the command XXXX.
#For example, if you don't want any user to delete files, you can do
@@ -286,7 +257,7 @@
# NOTE: Be careful when using this option and the DO_CHROOT option.
# The location of the root directory can change when using DO_CHROOT.
# The current working directory (cwd) is passed to the script you run.
- # PRE_WRITE_SCRIPT="/bin/true"
+ # PRE_WRITE_SCRIPT="@TERMUX_PREFIX@/bin/true"
# This option is enabled when the server should run
# a script after writing to the file system. This should
@@ -295,7 +266,7 @@
# NOTE: Be careful when using this option and the DO_CHROOT option.
# The location of the root directory can change when using DO_CHROOT.
# The current working directory (cwd) is passed to the script you run.
- # POST_WRITE_SCRIPT="/bin/false"
+ # POST_WRITE_SCRIPT="@TERMUX_PREFIX@/bin/false"
# The GNU C library makes some assumptions about the local time zone
# when run in a chroot environment. The Bftpd server tries to work
-17
View File
@@ -1,17 +0,0 @@
TERMUX_PKG_HOMEPAGE=http://bftpd.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Small, easy-to-configure FTP server"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=5.7
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://kumisystems.dl.sourceforge.net/project/bftpd/bftpd/bftpd-${TERMUX_PKG_VERSION}/bftpd-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=a543ce62a8092a7b5065146875cc9878534b09dc4a853f2c2b56e2de397a6f4b
TERMUX_PKG_DEPENDS="libcrypt"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_CONFFILES="etc/bftpd.conf"
TERMUX_PKG_RM_AFTER_INSTALL="var/log/bftpd.log"
termux_step_pre_configure() {
CFLAGS+=" -fcommon"
}
-37
View File
@@ -1,37 +0,0 @@
diff -uNr bftpd/Makefile.in bftpd.mod/Makefile.in
--- bftpd/Makefile.in 2020-01-10 02:14:00.000000000 +0200
+++ bftpd.mod/Makefile.in 2020-01-19 17:40:15.359393866 +0200
@@ -2,7 +2,7 @@
CC?=@CC@
INSTALL=@INSTALL@
prefix=@prefix@
-CFLAGS=@CFLAGS@ @DEFS@ -Wall -I. -DVERSION=\"$(VERSION)\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPREFIX=\"$(prefix)\" @DEBUG@
+CFLAGS=@CFLAGS@ @CPPFLAGS@ @DEFS@ -Wall -I. -DVERSION=\"$(VERSION)\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPREFIX=\"$(prefix)\" @DEBUG@
LIBS=@LIBS@
mandir=@mandir@
sbindir=@sbindir@
@@ -15,7 +15,7 @@
SRCS=bftpdutmp.c commands.c commands_admin.c cwd.c dirlist.c list.c login.c logging.c main.c mystring.c options.c md5.c
OBJS2LINK=$(OBJS) $(PAX)
-LDFLAGS=
+LDFLAGS=@LDFLAGS@
all: bftpd
@@ -38,12 +38,12 @@
install: all
mkdir -p $(DESTDIR)/$(prefix)/sbin
- $(INSTALL) -g 0 -m 700 -o 0 bftpd $(DESTDIR)/$(prefix)/sbin
+ $(INSTALL) -m 700 bftpd $(DESTDIR)/$(prefix)/sbin
mkdir -p $(DESTDIR)/$(mandir)/man8
- $(INSTALL) -g 0 -m 644 -o 0 bftpd.8 $(DESTDIR)/$(mandir)/man8
+ $(INSTALL) -m 644 bftpd.8 $(DESTDIR)/$(mandir)/man8
mkdir -p $(DESTDIR)/$(prefix)/etc
[ -f $(DESTDIR)/$(prefix)/etc/bftpd.conf ] || \
- $(INSTALL) -g 0 -m 600 -o 0 bftpd.conf $(DESTDIR)/$(prefix)/etc
+ $(INSTALL) -m 600 bftpd.conf $(DESTDIR)/$(prefix)/etc
mkdir -p $(DESTDIR)/$(prefix)/var/log
touch $(DESTDIR)/$(prefix)/var/log/bftpd.log
chmod 644 $(DESTDIR)/$(prefix)/var/log/bftpd.log
@@ -1,64 +0,0 @@
diff -uNr bftpd/options.c bftpd.mod/options.c
--- bftpd/options.c 2017-09-30 03:18:31.000000000 +0300
+++ bftpd.mod/options.c 2020-01-19 17:33:04.566591884 +0200
@@ -13,7 +13,7 @@
struct global config_global;
struct group_of_users *config_groups;
-struct user *config_users;
+struct bftpd_user *config_users;
/*
Returns NULL on error. May return
@@ -183,7 +183,7 @@
FILE *configfile;
char *str;
struct group_of_users *grp = NULL;
- struct user *usr = NULL;
+ struct bftpd_user *usr = NULL;
config_global.options = NULL;
config_global.directories = NULL;
if (!configpath)
@@ -209,9 +209,9 @@
create_options(configfile, &(config_global.options), &(config_global.directories));
} else if (strstr(str, "user ") == str) {
if (usr) {
- usr = usr->next = calloc(1, sizeof(struct user));
+ usr = usr->next = calloc(1, sizeof(struct bftpd_user));
} else {
- config_users = usr = calloc(1, sizeof(struct user));
+ config_users = usr = calloc(1, sizeof(struct bftpd_user));
}
/* avoid memory errors */
if (! usr)
@@ -349,7 +349,7 @@
char *getoption_user(char *name)
{
char *result;
- struct user *usr;
+ struct bftpd_user *usr;
if ((usr = config_users)) {
do {
if (!strcmp(user, usr->name)) {
diff -uNr bftpd/options.h bftpd.mod/options.h
--- bftpd/options.h 2012-11-08 20:33:35.000000000 +0200
+++ bftpd.mod/options.h 2020-01-19 17:32:28.686276802 +0200
@@ -48,15 +48,15 @@
struct directory *directories;
struct group_of_users *next;
};
-struct user {
+struct bftpd_user {
char *name;
struct bftpd_option *options;
struct directory *directories;
- struct user *next;
+ struct bftpd_user *next;
};
extern struct group_of_users *config_groups;
-extern struct user *config_users;
+extern struct bftpd_user *config_users;
void expand_groups();
void config_init();
-12
View File
@@ -1,12 +0,0 @@
diff -u -r ../ExtUtils-LibBuilder-0.08.orig/t/01-simple.t ./t/01-simple.t
--- ../ExtUtils-LibBuilder-0.08.orig/t/01-simple.t 2020-03-19 18:35:24.423661248 +0100
+++ ./t/01-simple.t 2020-03-19 18:37:50.234669799 +0100
@@ -59,7 +59,7 @@
} elsif ($^O =~ /darwin/i) {
$ENV{DYLD_LIBRARY_PATH} = ".";
}
-elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix)/i) {
+elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix|android)/i) {
$ENV{LD_LIBRARY_PATH} = ".";
if ($^O =~ /irix/) {
# trying my luck
-12
View File
@@ -1,12 +0,0 @@
diff -u -r ../Text-BibTeX-0.88.orig/inc/MyBuilder.pm ./inc/MyBuilder.pm
--- ../Text-BibTeX-0.88.orig/inc/MyBuilder.pm 2020-03-19 21:34:48.034256281 +0100
+++ ./inc/MyBuilder.pm 2020-03-19 21:35:23.929258386 +0100
@@ -378,7 +378,7 @@
if ($^O =~ /darwin/i) {
$ENV{DYLD_LIBRARY_PATH} = catdir($self->blib, "usrlib");
}
- elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix|gnu)/i) {
+ elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix|gnu|android)/i) {
$ENV{LD_LIBRARY_PATH} = catdir($self->blib, "usrlib");
}
elsif ($^O =~ /aix/i) {
-39
View File
@@ -1,39 +0,0 @@
TERMUX_PKG_HOMEPAGE=http://biblatex-biber.sourceforge.net
TERMUX_PKG_DESCRIPTION="A Unicode-capable BibTeX replacement for biblatex users"
TERMUX_PKG_LICENSE="Artistic-License-2.0"
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
TERMUX_PKG_VERSION=2.16
TERMUX_PKG_REVISION=2
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_DEPENDS="perl, libxslt, libxml2 (>> 2.9.10-3), openssl-tool, make, clang, pkg-config"
EXTUTILS_LIBBUILDER_VERSION=0.08
TEXT_BIBTEX_VERSION=0.88
termux_step_make_install() {
mkdir -p $TERMUX_PREFIX/opt/biber
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
-e "s|@TEXT_BIBTEX_VERSION@|${TEXT_BIBTEX_VERSION}|g" \
-e "s|@EXTUTILS_LIBBUILDER_VERSION@|${EXTUTILS_LIBBUILDER_VERSION}|g" \
-e "s|@BIBER_VERSION@|${TERMUX_PKG_VERSION}|g" \
"$TERMUX_PKG_BUILDER_DIR"/installer.sh \
> $TERMUX_PREFIX/bin/termux-install-biber
chmod 700 $TERMUX_PREFIX/bin/termux-install-biber
install -m600 "$TERMUX_PKG_BUILDER_DIR"/ExtUtils-LibBuilder.diff $TERMUX_PREFIX/opt/biber/
install -m600 "$TERMUX_PKG_BUILDER_DIR"/Text-BibTeX.diff $TERMUX_PREFIX/opt/biber/
# Uninstalling all dependencies on uninstall would be annoying, so
# lets leave that for the user to deal with..
}
termux_step_create_debscripts() {
{
echo "#!$TERMUX_PREFIX/bin/sh"
echo "echo ''"
echo "echo '[*] You can now run the biber installer by running'"
echo "echo ''"
echo "echo ' termux-install-biber'"
echo "echo ''"
echo "echo ' The installation will take a while.'"
} > ./postinst
}
-70
View File
@@ -1,70 +0,0 @@
#!@TERMUX_PREFIX@/bin/bash
set -e
# unset variables that the user might have set to force installation to $PREFIX
unset PERL_LOCAL_LIB_ROOT
unset PERL5LIB
unset PERL_MM_OPT
unset PERL_MB_OPT
export PREFIX=@TERMUX_PREFIX@
export TMPDIR=@TERMUX_PREFIX@/tmp
export EXTUTILS_LIBBUILDER_VERSION=@EXTUTILS_LIBBUILDER_VERSION@
export TEXT_BIBTEX_VERSION=@TEXT_BIBTEX_VERSION@
export BIBER_VERSION=@BIBER_VERSION@
# Lock terminal to prevent sending text input and special key
# combinations that may break installation process.
stty -echo -icanon time 0 min 0 intr undef quit undef susp undef
# Use trap to unlock terminal at exit.
trap 'while read -r; do true; done; stty sane;' EXIT
echo "[*] Installing cpanm..."
cpan install App::cpanminus
export PATH="$PATH:$HOME/perl5/bin"
echo "[*] Downloading and patching troublesome dependencies..."
cd $TMPDIR
if [ ! -f ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz ]; then
curl --fail --retry 3 --location --output "$TMPDIR/ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz" \
"https://cpan.metacpan.org/authors/id/A/AM/AMBS/ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz"
else
rm -rf ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}
fi
tar -xf ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz
cd ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}
patch -Np1 -i $PREFIX/opt/biber/ExtUtils-LibBuilder.diff
cpanm .
cd ..
if [ ! -f Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz ]; then
curl --fail --retry 3 --location --output "$TMPDIR/Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz" \
"https://cpan.metacpan.org/authors/id/A/AM/AMBS/Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz"
else
rm -rf Text-BibTeX-${TEXT_BIBTEX_VERSION}
fi
tar -xf Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz && cd Text-BibTeX-${TEXT_BIBTEX_VERSION}
patch -Np1 -i $PREFIX/opt/biber/Text-BibTeX.diff
cpanm .
cd ..
echo "[*] Installing biber and its dependencies (may take long time)..."
if [ ! -f biber-${BIBER_VERSION}.tar.gz ]; then
curl --fail --retry 3 --location --output "biber-${BIBER_VERSION}.tar.gz" \
"https://github.com/plk/biber/archive/v${BIBER_VERSION}.tar.gz"
else
rm -rf biber-${BIBER_VERSION}
fi
tar -xf biber-${BIBER_VERSION}.tar.gz && cd biber-${BIBER_VERSION}
cpanm --notest .
cd ..
echo "[*] biber installation finished."
exit 0
-12
View File
@@ -1,12 +0,0 @@
diff -uNr boinc-client_release-7.16-7.16.16/_autosetup boinc-client_release-7.16-7.16.16.mod/_autosetup
--- boinc-client_release-7.16-7.16.16/_autosetup 2021-02-01 07:38:58.000000000 +0800
+++ boinc-client_release-7.16-7.16.16.mod/_autosetup 2021-10-23 10:32:01.471359652 +0800
@@ -19,7 +19,7 @@
check_version()
{
dir=`pwd`
- cd /tmp
+ cd "${TMPDIR:-/tmp}"
foundit=
## get current version of $1
desired=`echo $2 | awk -F. '{print $1*100+$2}'`
+3 -4
View File
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Open-source software for volunteer computing"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=7.16.16
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/BOINC/boinc/archive/client_release/${TERMUX_PKG_VERSION:0:4}/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=0d5656a9f8ed1048936a5764270848b892d63f27bdb863d0ace447f1eaae6002
TERMUX_PKG_DEPENDS="libandroid-shmem, libc++, libcurl, openssl, zlib"
@@ -18,9 +18,8 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
TERMUX_PKG_CONFFILES="etc/boinc-client.conf"
termux_step_pre_configure() {
# for benchmark purposes
CFLAGS="${CFLAGS/-Oz/-Os}"
CXXFLAGS="${CXXFLAGS/-Oz/-Os}"
CFLAGS="${CFLAGS/-Oz/-O2}"
CXXFLAGS="${CXXFLAGS/-Oz/-O2}"
LDFLAGS+=" -landroid-shmem"
./_autosetup
}
+3 -2
View File
@@ -2,9 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://www.bittorrent.com/btfs/
TERMUX_PKG_DESCRIPTION="Decentralized file system integrating with TRON network"
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=1.5.3
TERMUX_PKG_VERSION=1.5.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/TRON-US/go-btfs/archive/refs/tags/btfs-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=331cc8a2b3cf2f5813902685f562ab78f602b028c45507ab9d67d35664719942
TERMUX_PKG_SHA256=a7054a8cce28a6dee6f6eb1be262309128bbca8d572ca73154907997fd97d7ed
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+\.\d+\.\d+"
TERMUX_PKG_BUILD_IN_SRC=true
+2 -2
View File
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://c-ares.haxx.se
TERMUX_PKG_DESCRIPTION="Library for asynchronous DNS requests (including name resolves)"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.18.1
TERMUX_PKG_VERSION=1.17.2
TERMUX_PKG_SRCURL=https://github.com/c-ares/c-ares/archive/cares-${TERMUX_PKG_VERSION//./_}.tar.gz
TERMUX_PKG_SHA256=414872549eec4e221b576693fdc9c9bce44ff794d0f1f06f2515b56a7f6ec9c9
TERMUX_PKG_SHA256=444b7dbf33cb6e8a764d069e3485cbaaa28386d60eace6988275c3cb9534d300
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+.\d+.\d+"
TERMUX_PKG_BREAKS="c-ares-dev"
+4 -3
View File
@@ -2,10 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://curl.se/docs/caextract.html
TERMUX_PKG_DESCRIPTION="Common CA certificates"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1:2021-10-26
TERMUX_PKG_SRCURL=https://curl.se/ca/cacert-${TERMUX_PKG_VERSION:2}.pem
TERMUX_PKG_VERSION=20211001
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://curl.se/ca/cacert.pem
# If the checksum has changed, it may be time to update the package version:
TERMUX_PKG_SHA256=ae31ecb3c6e9ff3154cb7a55f017090448f88482f0e94ac927c0c67a1f33b9cf
TERMUX_PKG_SHA256=f524fc21859b776e18df01a87880efa198112214e13494275dbcbd9bcb71d976
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
-1
View File
@@ -3,7 +3,6 @@ TERMUX_PKG_DESCRIPTION="Compiler cache for fast recompilation of C/C++ code"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=4.4.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/ccache/ccache/releases/download/v$TERMUX_PKG_VERSION/ccache-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=9200cafbaa5fd62c2600fccb40a18214e57747825e6cdcd76688b4b61c2dcba0
TERMUX_PKG_AUTO_UPDATE=true
+2 -2
View File
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://chezmoi.io
TERMUX_PKG_DESCRIPTION="Manage your dotfiles across multiple machines"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
TERMUX_PKG_VERSION=2.7.4
TERMUX_PKG_VERSION=2.7.3
TERMUX_PKG_SRCURL=https://github.com/twpayne/chezmoi/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=71cdf60840a1674e929f9faa5220e0175077f5a6e72b58dcc5d1b17596aa3ae2
TERMUX_PKG_SHA256=a9dbaa9bd55f1c1e1c82c7ae5b7b1933f907703d5bd9976b2c14321b8c1e0d90
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make() {
+5 -4
View File
@@ -2,8 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/kpet/clvk
TERMUX_PKG_DESCRIPTION="Experimental implementation of OpenCL on Vulkan"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.0.20211027
_COMMIT=ed030247b3a32851f4d9787c162dbf8be5a665c2
TERMUX_PKG_VERSION=0.0.20210829
TERMUX_PKG_REVISION=1
_COMMIT=2797e13ee3b03cbc97bc2afa3e99fc35d6a0c831
TERMUX_PKG_SRCURL=https://github.com/kpet/clvk.git
TERMUX_PKG_GIT_BRANCH=master
TERMUX_PKG_BUILD_DEPENDS="vulkan-loader-android"
@@ -54,8 +55,8 @@ termux_step_host_build() {
cmake \
-G Ninja \
-S "$TERMUX_PKG_SRCDIR/external/clspv/third_party/llvm/llvm" \
-DLLVM_ENABLE_PROJECTS=clang
-DLLVM_ENABLE_PROJECTS='clang' \
"$TERMUX_PKG_SRCDIR/external/clspv/third_party/llvm/llvm"
cmake \
--build "$TERMUX_PKG_HOSTBUILD_DIR" \
-j "$TERMUX_MAKE_PROCESSES" \
+1 -1
View File
@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
# When updating version here, please update termux_setup_cmake.sh as well.
TERMUX_PKG_VERSION=3.21.3
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.cmake.org/files/v${TERMUX_PKG_VERSION:0:4}/cmake-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f
TERMUX_PKG_DEPENDS="libarchive, libc++, libcurl, libexpat, jsoncpp, libuv, rhash, make, clang, zlib"
+2 -2
View File
@@ -2,6 +2,6 @@ TERMUX_PKG_HOMEPAGE=https://github.com/termux/command-not-found
TERMUX_PKG_DESCRIPTION="Suggest installation of packages in interactive shell sessions"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.66
TERMUX_PKG_VERSION=1.65
TERMUX_PKG_SRCURL=https://github.com/termux/command-not-found/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=4a8765a45930715cabc931bd38c4553572db5a4952412cc333910248fd83c8bb
TERMUX_PKG_SHA256=1c6a46340840c3508c60a757b8278e857fc7645807248f656bbdd11395858476
+4 -2
View File
@@ -2,6 +2,8 @@ TERMUX_PKG_HOMEPAGE=https://github.com/danmar/cppcheck
TERMUX_PKG_DESCRIPTION="tool for static C/C++ code analysis"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.6.1
TERMUX_PKG_VERSION=2.5
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/danmar/cppcheck/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=41700db44b349428d5602356b32183b7776380e7a5b0b82a2f2764fadadb015e
TERMUX_PKG_SHA256=dc27154d799935c96903dcc46653c526c6f4148a6912b77d3a50cb35dabd82e1
TERMUX_PKG_BLACKLISTED_ARCHES="i686"
+5 -5
View File
@@ -1,11 +1,11 @@
--- ./cli/threadexecutor.cpp.orig 2021-10-26 21:30:46.557469590 +0530
+++ ./cli/threadexecutor.cpp 2021-10-26 21:32:35.957469548 +0530
@@ -149,7 +149,7 @@
--- cli/threadexecutor.cpp.orig 2019-11-08 23:29:10.428984535 +0000
+++ ./cli/threadexecutor.cpp 2019-11-08 23:29:51.245623336 +0000
@@ -143,7 +143,7 @@
bool ThreadExecutor::checkLoadAverage(size_t nchildren)
{
-#if defined(__CYGWIN__) || defined(__QNX__) || defined(__HAIKU__) // getloadavg() is unsupported on Cygwin, Qnx, Haiku.
+#if defined(__CYGWIN__) || defined(__QNX__) || defined(__HAIKU__) || defined(__ANDROID__) // getloadavg() is unsupported on Cygwin, Qnx, Haiku, Android.
-#if defined(__CYGWIN__) || defined(__QNX__) // getloadavg() is unsupported on Cygwin, Qnx.
+#if defined(__CYGWIN__) || defined(__QNX__) || defined(__ANDROID__) // getloadavg() is unsupported on Cygwin, Qnx.
return true;
#else
if (!nchildren || !mSettings.loadAverage) {
+3 -5
View File
@@ -2,17 +2,15 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/debianutils
TERMUX_PKG_DESCRIPTION="Small utilities which are used primarily by the installation scripts of Debian packages"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=5.5
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/d/debianutils/debianutils_${TERMUX_PKG_VERSION}.orig.tar.xz
TERMUX_PKG_SHA256=2b0fad5c00eb2b8461523b2950e6f06e6ddbb0ac3384c5a3377867d51098d102
TERMUX_PKG_VERSION=4.11.2
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/d/debianutils/debianutils_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3b680e81709b740387335fac8f8806d71611dcf60874e1a792e862e48a1650de
TERMUX_PKG_RM_AFTER_INSTALL="
bin/add-shell
bin/installkernel
bin/remove-shell
bin/update-shells
share/man/man8/add-shell.8
share/man/man8/installkernel.8
share/man/man8/remove-shell.8
share/man/man8/update-shells.8
"
+1 -1
View File
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A documentation system for C++, C, Java, IDL and PHP"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.9.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/doxygen/doxygen/archive/Release_${TERMUX_PKG_VERSION//./_}.tar.gz
TERMUX_PKG_SHA256=40f429241027ea60f978f730229d22e971786172fdb4dc74db6406e7f6c034b3
TERMUX_PKG_DEPENDS="libc++, libiconv"
-12
View File
@@ -1,12 +0,0 @@
TERMUX_PKG_HOMEPAGE=http://dtach.sourceforge.net/
TERMUX_PKG_DESCRIPTION="Emulates the detach feature of screen"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.9
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/sourceforge/dtach/dtach-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=32e9fd6923c553c443fab4ec9c1f95d83fa47b771e6e1dafb018c567291492f3
termux_step_make_install() {
install -Dm700 -t ${TERMUX_PREFIX}/bin dtach
install -Dm600 -t ${TERMUX_PREFIX}/share/man/man1 ${TERMUX_PKG_SRCDIR}/dtach.1
}
-80
View File
@@ -1,80 +0,0 @@
diff -u -r ../Electrum-4.0.2/electrum/electrum ./electrum/electrum
--- ../Electrum-4.0.2/electrum/electrum 2000-11-11 12:11:11.000000000 +0100
+++ ./electrum/electrum 2020-09-07 21:17:21.808618513 +0200
@@ -43,7 +43,7 @@
script_dir = os.path.dirname(os.path.realpath(__file__))
is_bundle = getattr(sys, 'frozen', False)
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
-is_android = 'ANDROID_DATA' in os.environ
+is_android = False
if is_local: # running from source
# developers should probably see all deprecation warnings.
diff -u -r ./electrum/logging.py ../Electrum-4.0.2/electrum/logging.py
--- ./electrum/logging.py 2020-09-07 19:57:16.486326385 +0200
+++ ../Electrum-4.0.2/electrum/logging.py 2000-11-11 12:11:11.000000000 +0100
@@ -233,7 +233,7 @@
_configure_verbosity(verbosity=verbosity, verbosity_shortcuts=verbosity_shortcuts)
log_to_file = config.get('log_to_file', False)
- is_android = 'ANDROID_DATA' in os.environ
+ is_android = False
if is_android:
from jnius import autoclass
build_config = autoclass("org.electrum.electrum.BuildConfig")
@@ -258,7 +258,7 @@
def describe_os_version() -> str:
- if 'ANDROID_DATA' in os.environ:
+ if False:
from kivy import utils
if utils.platform != "android":
return utils.platform
diff -u -r ../Electrum-4.0.2/electrum/util.py ./electrum/util.py
--- ../Electrum-4.0.2/electrum/util.py 2000-11-11 12:11:11.000000000 +0100
+++ ./electrum/util.py 2020-09-07 21:23:38.651085966 +0200
@@ -339,10 +339,6 @@
self.running = False
def on_stop(self):
- if 'ANDROID_DATA' in os.environ:
- import jnius
- jnius.detach()
- self.logger.info("jnius detach")
self.logger.info("stopped")
@@ -406,10 +402,7 @@
return PythonActivity.mActivity.getFilesDir().getPath() + '/data'
def get_backup_dir(config):
- if 'ANDROID_DATA' in os.environ:
- return android_backup_dir() if config.get('android_backups') else None
- else:
- return config.get('backup_dir')
+ return config.get('backup_dir')
def ensure_sparse_file(filename):
# On modern Linux, no need to do anything.
@@ -532,7 +525,7 @@
if "ELECTRUMDIR" in os.environ:
return os.environ["ELECTRUMDIR"]
elif 'ANDROID_DATA' in os.environ:
- return android_data_dir()
+ return os.path.join(os.environ["HOME"], ".electrum")
elif os.name == 'posix':
return os.path.join(os.environ["HOME"], ".electrum")
elif "APPDATA" in os.environ:
diff -u -r ../Electrum-4.0.2/run_electrum ./run_electrum
--- ./run_electrum 2020-09-07 19:55:33.069993775 +0200
+++ ../Electrum-4.0.2/run_electrum 2000-11-11 12:11:11.000000000 +0100
@@ -43,7 +43,7 @@
script_dir = os.path.dirname(os.path.realpath(__file__))
is_bundle = getattr(sys, 'frozen', False)
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
-is_android = 'ANDROID_DATA' in os.environ
+is_android = False
if is_local: # running from source
# developers should probably see all deprecation warnings.
-76
View File
@@ -1,76 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://electrum.org
TERMUX_PKG_DESCRIPTION="Electrum is a lightweight Bitcoin wallet."
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=4.0.5
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://download.electrum.org/$TERMUX_PKG_VERSION/Electrum-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=6790407e21366186d928c8e653e3ab38476ca86e4797aa4db94dcca2384db41a
TERMUX_PKG_DEPENDS="python, libsecp256k1"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
# asciinema previously contained some files that python packages have in common
TERMUX_PKG_CONFLICTS="asciinema (<< 1.4.0-1)"
_PYTHON_VERSION=3.10
TERMUX_PKG_RM_AFTER_INSTALL="
bin/easy_install
bin/qr
bin/chardetect
bin/qdarkstyle
bin/easy_install-${_PYTHON_VERSION}
lib/python${_PYTHON_VERSION}/site-packages/easy-install.pth
lib/python${_PYTHON_VERSION}/site-packages/site.py
lib/python${_PYTHON_VERSION}/site-packages/setuptools.pth
lib/python${_PYTHON_VERSION}/site-packages/electrum/gui/qt
lib/python${_PYTHON_VERSION}/site-packages/helpdev-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/attrs-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/PySocks-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/dnspython-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/ecdsa-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/jsonrpclib_pelix-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/pbkdf2-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/protobuf-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/pyaes-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/qrcode-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/aiohttp_socks-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/aiorpcX-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/async_timeout-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/certifi-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/yarl-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/QDarkStyle-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/QtPy-*-py${_PYTHON_VERSION}.egg
lib/python${_PYTHON_VERSION}/site-packages/aiohttp-*-py${_PYTHON_VERSION}-*.egg
lib/python${_PYTHON_VERSION}/site-packages/multidict-*-py${_PYTHON_VERSION}-*.egg
lib/python${_PYTHON_VERSION}/site-packages/protobuf-*-py${_PYTHON_VERSION}-*.egg
"
termux_step_make () {
return
}
termux_step_make_install () {
# Force reinstall:
rm -rf $TERMUX_PREFIX/lib/python${_PYTHON_VERSION}/site-packages/electrum
rm -rf $TERMUX_PREFIX/lib/python${_PYTHON_VERSION}/site-packages/Electrum-${TERMUX_PKG_VERSION}-py${_PYTHON_VERSION}.egg*
export PYTHONPATH=$TERMUX_PREFIX/lib/python${_PYTHON_VERSION}/site-packages/
YARL_NO_EXTENSIONS=1 MULTIDICT_NO_EXTENSIONS=1 \
CFLAGS=-I$TERMUX_PREFIX/include/python${_PYTHON_VERSION} \
python${_PYTHON_VERSION} setup.py install --prefix=$TERMUX_PREFIX
}
termux_step_post_massage () {
find . -path '*/__pycache__*' -delete
# Other python packages also provides this file. Should be removed from all python packages
for file in ./lib/python${_PYTHON_VERSION}/site-packages/easy-install.pth ./lib/python${_PYTHON_VERSION}/site-packages/site.py; do
if [ -f $file ]; then
rm $file
fi
done
}
termux_step_create_debscripts () {
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo "pip3 install 'ecdsa>=0.14' 'qrcode' 'protobuf>=3.12' 'dnspython<2.0' 'qdarkstyle<2.9' 'aiorpcx>=0.18,<0.19' 'aiohttp>=3.3.0,<4.0.0' 'aiohttp_socks>=0.3' 'certifi' 'bitstring' 'attrs>=19.2.0' 'pycryptodomex'" >> postinst
}
-22
View File
@@ -1,22 +0,0 @@
diff -u -r ../Electrum-4.0.2/electrum/daemon.py ./electrum/daemon.py
--- ../Electrum-4.0.2/electrum/daemon.py 2019-07-11 15:08:35.000000000 +0200
+++ ./electrum/daemon.py 2020-05-03 13:46:52.373992401 +0200
@@ -342,7 +342,7 @@
def init_gui(self, config, plugins):
threading.current_thread().setName('GUI')
- gui_name = config.get('gui', 'qt')
+ gui_name = config.get('gui', 'text')
if gui_name in ['lite', 'classic']:
gui_name = 'qt'
gui = __import__('electrum.gui.' + gui_name, fromlist=['electrum'])
--- ./setup.py.orig 2000-11-11 12:11:11.000000000 +0100
+++ ./setup.py 2020-09-07 20:42:26.406766373 +0200
@@ -73,7 +73,6 @@
packages=[
'electrum',
'electrum.gui',
- 'electrum.gui.qt',
'electrum.plugins',
] + [('electrum.plugins.'+pkg) for pkg in find_packages('electrum/plugins')],
package_dir={
+28 -66
View File
@@ -2,39 +2,16 @@ TERMUX_PKG_HOMEPAGE=https://emscripten.org
TERMUX_PKG_DESCRIPTION="Emscripten: An LLVM-to-WebAssembly Compiler"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@truboxl"
TERMUX_PKG_VERSION=2.0.32
TERMUX_PKG_VERSION=2.0.31
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/emscripten-core/emscripten.git
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_RECOMMENDS="emscripten-llvm, emscripten-binaryen, python, nodejs-lts | nodejs"
TERMUX_PKG_RECOMMENDS="emscripten-llvm, emscripten-binaryen, python, nodejs-lts | nodejs, debianutils"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_NO_STATICSPLIT=true
# remove files according to emsdk/upstream directory after running
# ./emsdk install latest
TERMUX_PKG_RM_AFTER_INSTALL="
opt/emscripten-llvm/bin/clang-check
opt/emscripten-llvm/bin/clang-cl
opt/emscripten-llvm/bin/clang-cpp
opt/emscripten-llvm/bin/clang-extdef-mapping
opt/emscripten-llvm/bin/clang-format
opt/emscripten-llvm/bin/clang-func-mapping
opt/emscripten-llvm/bin/clang-import-test
opt/emscripten-llvm/bin/clang-offload-bundler
opt/emscripten-llvm/bin/clang-refactor
opt/emscripten-llvm/bin/clang-rename
opt/emscripten-llvm/bin/clang-scan-deps
opt/emscripten-llvm/bin/ld.lld
opt/emscripten-llvm/bin/ld64.lld
opt/emscripten-llvm/bin/ld64.lld.darwin*
opt/emscripten-llvm/bin/lld-link
opt/emscripten-llvm/bin/llvm-lib
opt/emscripten-llvm/lib/libclang.so*
opt/emscripten-llvm/share
opt/emscripten/LICENSE
"
# https://github.com/emscripten-core/emscripten/blob/main/docs/packaging.md
# https://github.com/archlinux/svntogit-community/tree/packages/emscripten/trunk
# below generates commit hash for the deps according to emscripten releases
@@ -50,13 +27,13 @@ opt/emscripten/LICENSE
# https://github.com/emscripten-core/emscripten/issues/11362
# can switch to stable LLVM to save space once above is fixed
LLVM_COMMIT=9403514e764950a0dfcd627fc90c73432314bced
LLVM_TGZ_SHA256=fb355b3cd159e0e699a32f7fb1e2612322b019ed73b4aa37b493fc7f9fe03f31
LLVM_COMMIT=8fa2394bad433558f3083cee158043e2fb66d781
LLVM_TGZ_SHA256=5199e1e459a9b1308e145d775c540bac72d0a75b81a4558d08ffd7444412f8d1
# https://github.com/emscripten-core/emscripten/issues/12252
# upstream says better bundle the right binaryen revision for now
BINARYEN_COMMIT=c19ff59c71824b34fa312aac9ad979e2198d7d36
BINARYEN_TGZ_SHA256=cfd4d53d22c868587ffa8020f32e41fa9bb847b368d1c29dc82da2ce35e5d816
BINARYEN_COMMIT=65bcde2c30e82047a892332b95b114bc86f89614
BINARYEN_TGZ_SHA256=093bf206d34a7e239b4ae9dd9e9f393099622cebaa781d859b0f85e2305735d4
# https://github.com/emscripten-core/emsdk/blob/main/emsdk.py
# https://chromium.googlesource.com/emscripten-releases/+/refs/heads/main/src/build.py
@@ -81,7 +58,6 @@ LLVM_BUILD_ARGS="
-DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
-DCLANG_DEFAULT_LINKER=lld
-DCLANG_ENABLE_ARCMT=OFF
-DCLANG_ENABLE_STATIC_ANALYZER=OFF
-DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen
@@ -116,9 +92,7 @@ termux_step_post_get_source() {
tar -xf "$TERMUX_PKG_CACHEDIR/binaryen.tar.gz" -C "$TERMUX_PKG_CACHEDIR"
cd "$TERMUX_PKG_CACHEDIR/llvm-project-$LLVM_COMMIT"
for patch in $TERMUX_PKG_BUILDER_DIR/*.patch.diff; do
patch -p1 -i "$patch"
done
git apply "$TERMUX_PKG_BUILDER_DIR/llvm-project.git-patch.txt"
}
termux_step_host_build() {
@@ -178,13 +152,10 @@ termux_step_make() {
}
termux_step_make_install() {
# skip using Makefile which does host npm install
# skip using Makefile which does host npm install, tar archive and extract steps
rm -fr "$TERMUX_PREFIX/opt/emscripten"
./tools/install.py "$TERMUX_PREFIX/opt/emscripten"
# subpackage optional third party test suite files
cp -fr "$TERMUX_PKG_SRCDIR/tests/third_party" "$TERMUX_PREFIX/opt/emscripten/tests/third_party"
# first run generates .emscripten and exits immediately
rm -f "$TERMUX_PKG_SRCDIR/.emscripten"
./emcc
@@ -195,31 +166,34 @@ termux_step_make_install() {
grep "$TERMUX_PREFIX" "$TERMUX_PKG_SRCDIR/.emscripten"
install -Dm644 "$TERMUX_PKG_SRCDIR/.emscripten" "$TERMUX_PREFIX/opt/emscripten/.emscripten"
# add emscripten directory to PATH var
# https://github.com/emscripten-core/emscripten/issues/9098 (fixed in 2.0.17)
cat <<- EOF > "$TERMUX_PKG_TMPDIR/emscripten.sh"
#!$TERMUX_PREFIX/bin/sh
export PATH=\$PATH:$TERMUX_PREFIX/opt/emscripten
EOF
install -Dm644 "$TERMUX_PKG_TMPDIR/emscripten.sh" "$TERMUX_PREFIX/etc/profile.d/emscripten.sh"
# remove unneeded files
for tool in clang-{check,cl,cpp,extdef-mapping,format,func-mapping,import-test,offload-bundler,refactor,rename,scan-deps} \
lld-link ld.lld ld64.lld llvm-lib ld64.lld.darwin{new,old}; do
rm -f "$TERMUX_PREFIX/opt/emscripten-llvm/bin/$tool"
done
rm -f $TERMUX_PREFIX/opt/emscripten-llvm/lib/libclang.so*
rm -fr "$TERMUX_PREFIX/opt/emscripten-llvm/share"
# termux_step_install_license also handles LICENSE file
rm -f "$TERMUX_PREFIX/opt/emscripten/LICENSE"
# add useful tools not installed by LLVM_INSTALL_TOOLCHAIN_ONLY=ON
for tool in FileCheck llc llvm-{as,dis,link,mc,nm,objdump,readobj,size,dwarfdump,dwp} opt; do
install -Dm755 "$TERMUX_PKG_CACHEDIR/build-llvm/bin/$tool" "$TERMUX_PREFIX/opt/emscripten-llvm/bin/$tool"
done
# unable to determine the reason why different linker searches for
# libclang_rt.builtins-*-android.a in different paths even after adding
# the patches from libllvm (also which one is more correct?)
#
# binutils LD searches lib/clang/14.0.0/lib/linux (exist)
# LLVM LD.LLD searches lib/clang/14.0.0/lib/android (not exist)
ln -fsT "linux" "$TERMUX_PREFIX/opt/emscripten-llvm/lib/clang/14.0.0/lib/android"
}
termux_step_create_debscripts() {
cat <<- EOF > postinst
#!$TERMUX_PREFIX/bin/sh
if [ -n "\$(command -v npm)" ]; then
if [ -n "\$(which npm)" ]; then
echo 'Running "npm ci --no-optional --production" in $TERMUX_PREFIX/opt/emscripten ...'
cd "$TERMUX_PREFIX/opt/emscripten"
npm ci --no-optional --production
@@ -233,14 +207,17 @@ termux_step_create_debscripts() {
please start a new session to take effect.
If you are upgrading, you may want to clear the
cache by running the command below to fix issues.
"emcc --clear-cache"
emcc --clear-cache'
Optional: Run the command below in Emscripten
directory to install tests dependencies before
running test suite.
"npm ci --no-optional"'
if [ -d "$TERMUX_PREFIX/lib/emscripten" ]; then
echo '
Note: The old Emscripten path has been deprecated.
To delete, simply run the command below.
rm -fr $TERMUX_PREFIX/lib/emscripten'
"rm -fr $TERMUX_PREFIX/lib/emscripten"'
fi
echo '
===================='
@@ -254,18 +231,3 @@ termux_step_create_debscripts() {
esac
EOF
}
# Emscripten Test Suite (Optional)
# Some preparations need to be made in Emscripten directory before running
# test suite on Android / Termux. Refer docs below:
# https://emscripten.org/docs/getting_started/test-suite.html
# https://github.com/emscripten-core/emscripten/pull/13493
# https://github.com/emscripten-core/emscripten/issues/9098
#
# Steps:
# - pkg install emscripten-tests-third-party openjdk-17
# - cd $PREFIX/opt/emscripten
# - npm ci --no-optional
# - export EMCC_CORES=1
# - export EMTEST_SKIP_V8=1
# - tests/runner {test_name}
@@ -1,3 +0,0 @@
TERMUX_SUBPKG_DESCRIPTION="Emscripten third party test suite files"
TERMUX_SUBPKG_PLATFORM_INDEPENDENT=true
TERMUX_SUBPKG_INCLUDE="opt/emscripten/tests/third_party"
@@ -1,21 +0,0 @@
diff -uNr llvm-project/clang/lib/Driver/ToolChain.cpp llvm-project.mod/clang/lib/Driver/ToolChain.cpp
--- llvm-project/clang/lib/Driver/ToolChain.cpp 2021-10-20 02:24:04.000000000 +0800
+++ llvm-project.mod/clang/lib/Driver/ToolChain.cpp 2021-10-29 10:06:11.727942353 +0800
@@ -405,7 +405,7 @@
case llvm::Triple::AIX:
return "aix";
default:
- return getOS();
+ return Triple.isAndroid() ? "android":getOS();
}
}
@@ -943,7 +943,7 @@
switch (Type) {
case ToolChain::CST_Libcxx:
- CmdArgs.push_back("-lc++");
+ CmdArgs.push_back("-lc++_shared");
break;
case ToolChain::CST_Libstdcxx:
@@ -1,38 +0,0 @@
diff -uNr llvm-project/clang/lib/Driver/ToolChains/Linux.cpp llvm-project.mod/clang/lib/Driver/ToolChains/Linux.cpp
--- llvm-project/clang/lib/Driver/ToolChains/Linux.cpp 2021-10-20 02:24:04.000000000 +0800
+++ llvm-project.mod/clang/lib/Driver/ToolChains/Linux.cpp 2021-10-29 14:39:16.043930634 +0800
@@ -287,7 +287,7 @@
if (Triple.getVendor() == llvm::Triple::OpenEmbedded &&
Triple.isArch64Bit())
addPathIfExists(D, SysRoot + "/usr/" + OSLibDir, Paths);
- else
+ else if (!IsAndroid)
addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths);
if (IsRISCV) {
StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple);
@@ -302,7 +302,7 @@
// searched.
// FIXME: It's not clear whether we should use the driver's installed
// directory ('Dir' below) or the ResourceDir.
- if (StringRef(D.Dir).startswith(SysRoot)) {
+ if (StringRef(D.Dir).startswith(SysRoot) && !IsAndroid) {
// Even if OSLibDir != "lib", this is needed for Clang in the build
// directory (not installed) to find libc++.
addPathIfExists(D, D.Dir + "/../lib", Paths);
@@ -311,7 +311,15 @@
}
addPathIfExists(D, SysRoot + "/lib", Paths);
- addPathIfExists(D, SysRoot + "/usr/lib", Paths);
+ bool nativeBuild = MultiarchTriple == getMultiarchTriple(D, llvm::Triple(llvm::sys::getDefaultTargetTriple()), SysRoot);
+ if (nativeBuild || !IsAndroid)
+ addPathIfExists(D, SysRoot + "/usr/lib", Paths);
+
+ if (IsAndroid) {
+ addPathIfExists(D, SysRoot + "/usr/" + MultiarchTriple + "/lib", Paths);
+ addPathIfExists(D, "/system/" + OSLibDir, Paths);
+ ExtraOpts.push_back("-rpath=" + SysRoot + "/usr/lib");
+ }
}
ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const {
@@ -1,31 +0,0 @@
diff -uNr llvm-project/compiler-rt/CMakeLists.txt llvm-project.mod/compiler-rt/CMakeLists.txt
--- llvm-project/compiler-rt/CMakeLists.txt 2021-10-20 02:24:04.000000000 +0800
+++ llvm-project.mod/compiler-rt/CMakeLists.txt 2021-10-29 15:54:24.623927409 +0800
@@ -201,6 +201,9 @@
elseif (FUCHSIA)
set(${var}_LIBNAME "libc++")
set(${var}_INTREE 1)
+ elseif (ANDROID)
+ set(${var}_LIBNAME "libc++_shared")
+ set(${var}_SYSTEM 1)
else()
set(${var}_LIBNAME "libstdc++")
set(${var}_SYSTEM 1)
@@ -215,7 +218,7 @@
# which pulls in the ABI transitively.
set(SANITIZER_CXX_ABI "default" CACHE STRING
"Specify C++ ABI library to use.")
-set(CXXABIS none default libstdc++ libc++ libcxxabi)
+set(CXXABIS none default libc++_shared libstdc++ libc++ libcxxabi)
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
handle_default_cxx_lib(SANITIZER_CXX_ABI)
@@ -524,6 +527,8 @@
list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++abi")
elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARIES)
+elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++_shared")
+ list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++_shared")
endif()
if (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libc++")
@@ -1,12 +0,0 @@
diff -uNr llvm-project/compiler-rt/lib/builtins/CMakeLists.txt llvm-project.mod/compiler-rt/lib/builtins/CMakeLists.txt
--- llvm-project/compiler-rt/lib/builtins/CMakeLists.txt 2021-10-20 02:24:04.000000000 +0800
+++ llvm-project.mod/compiler-rt/lib/builtins/CMakeLists.txt 2021-10-29 10:02:39.095942505 +0800
@@ -732,6 +732,8 @@
# Release mode already sets it via -O2/3, Debug mode doesn't.
if (${arch} STREQUAL "armhf")
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
+ elseif(${arch} STREQUAL "arm" AND ANDROID)
+ list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer)
endif()
# For RISCV32, we must force enable int128 for compiling long
@@ -1,14 +0,0 @@
diff -uNr llvm-project/libunwind/CMakeLists.txt llvm-project.mod/libunwind/CMakeLists.txt
--- llvm-project/libunwind/CMakeLists.txt 2021-10-20 02:24:04.000000000 +0800
+++ llvm-project.mod/libunwind/CMakeLists.txt 2021-10-29 10:02:54.163942494 +0800
@@ -194,6 +194,10 @@
add_compile_flags_if_supported(-Werror=return-type)
if (LIBUNWIND_ENABLE_CET)
+ if (NOT "libunwind" IN_LIST LLVM_ENABLE_RUNTIMES
+ AND "clang" IN_LIST LLVM_ENABLE_PROJECTS)
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../clang/lib/Headers")
+ endif()
add_compile_flags_if_supported(-fcf-protection=full)
add_compile_flags_if_supported(-mshstk)
if (NOT LIBUNWIND_SUPPORTS_FCF_PROTECTION_EQ_FULL_FLAG)
@@ -1,12 +0,0 @@
diff -uNr llvm-project/libunwind/src/assembly.h llvm-project.mod/libunwind/src/assembly.h
--- llvm-project/libunwind/src/assembly.h 2021-10-01 20:31:40.000000000 +0800
+++ llvm-project.mod/libunwind/src/assembly.h 2021-10-25 01:37:06.375932899 +0800
@@ -15,7 +15,7 @@
#ifndef UNWIND_ASSEMBLY_H
#define UNWIND_ASSEMBLY_H
-#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__)
+#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__) && defined(_LIBUNWIND_USE_CET)
#include <cet.h>
#define _LIBUNWIND_CET_ENDBR _CET_ENDBR
#else
@@ -1,30 +0,0 @@
diff -uNr llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp llvm-project.mod/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
--- llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp 2021-10-20 02:24:04.000000000 +0800
+++ llvm-project.mod/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp 2021-10-29 10:03:12.035942481 +0800
@@ -286,7 +286,7 @@
uintptr_t SlabSize = 0;
uintptr_t CurrentSlabOffset = 0;
SectionIDMap *SecIDMap = nullptr;
-#if defined(__x86_64__) && defined(__ELF__)
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
unsigned UsedTLSStorage = 0;
#endif
};
@@ -350,7 +350,7 @@
// In case the execution needs TLS storage, we define a very small TLS memory
// area here that will be used in allocateTLSSection().
-#if defined(__x86_64__) && defined(__ELF__)
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
extern "C" {
alignas(16) __attribute__((visibility("hidden"), tls_model("initial-exec"),
used)) thread_local char LLVMRTDyldTLSSpace[16];
@@ -361,7 +361,7 @@
TrivialMemoryManager::allocateTLSSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID,
StringRef SectionName) {
-#if defined(__x86_64__) && defined(__ELF__)
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
if (Size + UsedTLSStorage > sizeof(LLVMRTDyldTLSSpace)) {
return {};
}
@@ -0,0 +1,59 @@
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 16331d948b12..c99b3574e218 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -188,6 +188,10 @@ endif()
add_compile_flags_if_supported(-Werror=return-type)
if (LIBUNWIND_ENABLE_CET)
+ if (NOT "libunwind" IN_LIST LLVM_ENABLE_RUNTIMES
+ AND "clang" IN_LIST LLVM_ENABLE_PROJECTS)
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../clang/lib/Headers")
+ endif()
add_compile_flags_if_supported(-fcf-protection=full)
add_compile_flags_if_supported(-mshstk)
if (NOT LIBUNWIND_SUPPORTS_FCF_PROTECTION_EQ_FULL_FLAG)
diff --git a/libunwind/src/assembly.h b/libunwind/src/assembly.h
index e38d32336929..aadb4bc6a083 100644
--- a/libunwind/src/assembly.h
+++ b/libunwind/src/assembly.h
@@ -15,7 +15,7 @@
#ifndef UNWIND_ASSEMBLY_H
#define UNWIND_ASSEMBLY_H
-#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__)
+#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__) && defined(_LIBUNWIND_USE_CET)
#include <cet.h>
#define _LIBUNWIND_CET_ENDBR _CET_ENDBR
#else
diff --git a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
index 02c11f7689fb..eb6a02ec9198 100644
--- a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -285,7 +285,7 @@ private:
uintptr_t SlabSize = 0;
uintptr_t CurrentSlabOffset = 0;
SectionIDMap *SecIDMap = nullptr;
-#if defined(__x86_64__) && defined(__ELF__)
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
unsigned UsedTLSStorage = 0;
#endif
};
@@ -347,7 +347,7 @@ uint8_t *TrivialMemoryManager::allocateDataSection(uintptr_t Size,
// In case the execution needs TLS storage, we define a very small TLS memory
// area here that will be used in allocateTLSSection().
-#if defined(__x86_64__) && defined(__ELF__)
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
extern "C" {
alignas(16) __attribute__((visibility("hidden"), tls_model("initial-exec"),
used)) thread_local char LLVMRTDyldTLSSpace[16];
@@ -358,7 +358,7 @@ TrivialMemoryManager::TLSSection
TrivialMemoryManager::allocateTLSSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID,
StringRef SectionName) {
-#if defined(__x86_64__) && defined(__ELF__)
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
if (Size + UsedTLSStorage > sizeof(LLVMRTDyldTLSSpace)) {
return {};
}
+1 -2
View File
@@ -3,12 +3,11 @@ TERMUX_PKG_DESCRIPTION="Wraps a number of different spelling libraries and progr
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.3.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/AbiWord/enchant/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7f176aba971c7bf60f9bfe18937b77f566a06a38e2b9c4d9d481d3e73b308e6f
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-relocatable"
TERMUX_PKG_DEPENDS="aspell, glib, hunspell"
TERMUX_PKG_DEPENDS="glib"
termux_step_post_get_source() {
./bootstrap
-11
View File
@@ -1,11 +0,0 @@
--- enscript-1.6.6/afmlib/afm.c 2018-08-26 17:09:29.103000011 +0530
+++ afm.c 2018-08-26 17:11:32.170000006 +0530
@@ -27,7 +27,7 @@
* Static variables
*/
-static char *default_path = "/usr/local/lib/ps:/usr/lib/ps";
+static char *default_path = "@TERMUX_PREFIX@/usr/lib/ps";
static char *error_names[] =
{
-15
View File
@@ -1,15 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/enscript/
TERMUX_PKG_DESCRIPTION="Enscript converts ASCII text files to PostScript, HTML, RTF, ANSI and overstrikes"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=1.6.6
TERMUX_PKG_REVISION=11
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/enscript/enscript-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=6d56bada6934d055b34b6c90399aa85975e66457ac5bf513427ae7fc77f5c0bb
TERMUX_PKG_DEPENDS="cups, perl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --sysconfdir=$TERMUX_PREFIX/etc/enscript"
termux_step_post_make_install() {
cd "$TERMUX_PREFIX"/bin && patch -i "$TERMUX_PKG_BUILDER_DIR"/diffpp.patch.txt
cd "$TERMUX_PREFIX"/etc/enscript && patch -i "$TERMUX_PKG_BUILDER_DIR"/enscript.cfg.patch.txt
}
-11
View File
@@ -1,11 +0,0 @@
--- enscript-1.6.6/scripts/diffpp 2018-08-26 16:51:49.594000009 +0530
+++ diffpp 2018-08-27 18:05:56.762000111 +0530
@@ -69,7 +69,7 @@
open(FP, $file) || die "$program: couldn't open file `$file' for input: $!\n";
@orig_file = <FP>;
close(FP);
-$[ = 1;
+{ no warnings; $[ = 1; }
$orig_line_num = 1;
$orig_num_lines = @orig_file;
-11
View File
@@ -1,11 +0,0 @@
--- enscript-1.6.6/lib/enscript.cfg 2018-08-27 22:11:45.300000097 +0530
+++ enscript.cfg 2018-08-27 22:13:27.280000103 +0530
@@ -76,7 +76,7 @@
# HighlightBars: 2
# Library path. Let's use built-in default.
-# LibraryPath:
+LibraryPath: @TERMUX_PREFIX@/share/enscript
# How wrapped lines are marked in printout. Possible values are: `none',
# `plus', `box' and `arrow'. As a default, we do not mark them.
-13
View File
@@ -1,13 +0,0 @@
--- enscript-1.6.6/intl/lock.h 2018-08-26 16:33:29.944000060 +0530
+++ lock.h 2018-08-26 16:51:23.894000008 +0530
@@ -126,8 +126,8 @@
# endif
# if !PTHREAD_IN_USE_DETECTION_HARD
-# pragma weak pthread_cancel
-# define pthread_in_use() (pthread_cancel != NULL)
+# pragma weak pthread_kill
+# define pthread_in_use() (pthread_kill != NULL)
# endif
# else
+16 -11
View File
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.erlang.org/
TERMUX_PKG_DESCRIPTION="General-purpose concurrent functional programming language"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=24.1.4
TERMUX_PKG_VERSION=22.3.4.22
TERMUX_PKG_SRCURL=https://github.com/erlang/otp/archive/OTP-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=aa31ba689740dc446dfa5bb256474df5fb5e5459b981b4d2155afa91010ca66a
TERMUX_PKG_SHA256=dd306ac9987bbe80b20bf1efc8f94b7d6c0248c9fcb2dc761580c2c28d06cfba
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+(\.\d+)+"
TERMUX_PKG_DEPENDS="openssl, ncurses, zlib"
@@ -12,21 +12,26 @@ TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-javac --with-ssl=${TERMUX_PREFIX} --with-termcap"
TERMUX_PKG_EXTRA_MAKE_ARGS="noboot"
termux_step_post_get_source() {
# We need a host build every time, because we dont know the full output of host build and have no idea to cache it.
# We need a host build every time:
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
./otp_build autoconf
}
termux_step_host_build() {
cd $TERMUX_PKG_BUILDDIR
# Erlang cross compile reference: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-CROSS.md#building-a-bootstrap-system
# Build erlang bootstrap system.
./configure --enable-bootstrap-only --without-javac --without-ssl --without-termcap
make -j $TERMUX_MAKE_PROCESSES
cd $TERMUX_PKG_SRCDIR
./configure --enable-bootstrap-only
make -j "$TERMUX_MAKE_PROCESSES"
}
termux_step_pre_configure() {
# Add --build flag for erlang cross build
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --build=$(./erts/autoconf/config.guess)"
}
(cd erts && autoreconf)
# liblog is needed for syslog usage:
LDFLAGS+=" -llog"
# Put binaries built in termux_step_host_build at start of PATH:
cp bin/*/* $TERMUX_PKG_SRCDIR/bootstrap/bin
export PATH="$TERMUX_PKG_SRCDIR/bootstrap/bin:$PATH"
}
@@ -1,60 +0,0 @@
diff --git a/erts/emulator/asmjit/core/virtmem.cpp b/erts/emulator/asmjit/core/virtmem.cpp
index a1b0f95..d1eb1ad 100644
--- a/erts/emulator/asmjit/core/virtmem.cpp
+++ b/erts/emulator/asmjit/core/virtmem.cpp
@@ -62,12 +62,18 @@
#include <atomic>
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__ANDROID__)
#define ASMJIT_VM_SHM_DETECT 0
#else
#define ASMJIT_VM_SHM_DETECT 1
#endif
+#if defined(__ANDROID__)
+ #define ASMJIT_VM_SHM_AVAILABLE 0
+#else
+ #define ASMJIT_VM_SHM_AVAILABLE 1
+#endif
+
ASMJIT_BEGIN_NAMESPACE
// ============================================================================
@@ -258,8 +264,10 @@ public:
if (type == kFileTypeTmp)
return unlink(tmpName.data());
+#if ASMJIT_VM_SHM_AVAILABLE
else if (type == kFileTypeShm)
return shm_unlink(tmpName.data());
+#endif
else
return 0;
}
@@ -388,7 +396,7 @@ static ASMJIT_INLINE int VirtMem_appleSpecificMMapFlags(uint32_t flags) noexcept
#if !defined(SHM_ANON)
static const char* VirtMem_getTmpDir() noexcept {
const char* tmpDir = getenv("TMPDIR");
- return tmpDir ? tmpDir : "/tmp";
+ return tmpDir ? tmpDir : "@TERMUX_PREFIX@/tmp";
}
#endif
@@ -448,6 +456,7 @@ static Error VirtMem_openAnonymousMemory(AnonymousMemory* anonMem, bool preferTm
return kErrorOk;
}
}
+#if ASMJIT_VM_SHM_AVAILABLE
else {
anonMem->tmpName.assignFormat(kShmFormat, (unsigned long long)bits);
anonMem->fd = shm_open(anonMem->tmpName.data(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
@@ -456,6 +465,7 @@ static Error VirtMem_openAnonymousMemory(AnonymousMemory* anonMem, bool preferTm
return kErrorOk;
}
}
+#endif
int e = errno;
if (e != EEXIST)
+32 -72
View File
@@ -1,85 +1,45 @@
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index c3449c5..7fb2a20 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -800,28 +800,28 @@ endif
Based on the below change, updated for erlang 21:
From 85a3e5b4f65e5284e59dcdd90e92ea7d50ef6907 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@openwide.fr>
Date: Sun, 8 Feb 2015 17:23:13 +0100
Subject: [PATCH] erts/emulator: reorder inclued headers paths
If the Perl Compatible Regular Expressions is installed on the
host and the path to the headers is added to the CFLAGS, the
pcre.h from the host is used instead of the one provided by
erlang.
Erlang use an old version of this file which is incompatible
with the upstream one.
Move INCLUDES before CFLAGS to use pcre.h from erlang.
http://autobuild.buildroot.net/results/cbd/cbd8b54eef535f19d7d400fd269af1b3571d6143/build-end.log
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
erts/emulator/Makefile.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -u -r ../otp-OTP-21.0.1/erts/emulator/Makefile.in ./erts/emulator/Makefile.in
--- ../otp-OTP-21.0.1/erts/emulator/Makefile.in 2018-06-25 13:19:47.000000000 +0200
+++ ./erts/emulator/Makefile.in 2018-07-01 18:06:51.931989663 +0200
@@ -712,7 +712,7 @@
# Usually the same as the default rule, but certain platforms (e.g. win32) mix
# different compilers
$(OBJDIR)/beam_emu.o: beam/emu/beam_emu.c
$(OBJDIR)/beam_emu.o: beam/beam_emu.c
- $(V_EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_EMU_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/beam_emu.S: beam/emu/beam_emu.c
- $(V_EMU_CC) -S -fverbose-asm $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_EMU_CC) -S -fverbose-asm $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%_pg.o: beam/%.c
- $(V_CC) $(PROFILE_GENERATE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(PROFILE_GENERATE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%_pg.o: beam/emu/%.c
- $(V_CC) $(PROFILE_GENERATE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(PROFILE_GENERATE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%_pu.o: beam/%.c $(PROFILE_USE_DEPS)
- $(V_CC) $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%_pu.o: beam/emu/%.c $(PROFILE_USE_DEPS)
- $(V_CC) $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%_pu.S: beam/%.c $(PROFILE_USE_DEPS)
- $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%_pu.S: beam/emu/%.c $(PROFILE_USE_DEPS)
- $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/PROFILE: $(BINDIR)/$(PROFILE_EXECUTABLE)
$(V_at)echo " PROFILE ${PROFILE_EXECUTABLE}"
@@ -847,7 +847,7 @@ ifeq ($(ERTS_BUILD_FALLBACK_POLL),yes)
# Have to treat erl_poll differently as the same .c file is used
# twice for kernel poll builds.
$(OBJDIR)/erl_poll.o: sys/common/erl_poll.c
- $(V_CC) -DERTS_KERNEL_POLL_VERSION $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) -DERTS_KERNEL_POLL_VERSION $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
# Do a copy in order to make debuggers less confused
$(TTF_DIR)/erl_poll.flbk.c: sys/common/erl_poll.c
@@ -855,7 +855,7 @@ $(TTF_DIR)/erl_poll.flbk.c: sys/common/erl_poll.c
@touch $@
$(OBJDIR)/erl_poll.flbk.o: $(TTF_DIR)/erl_poll.flbk.c
- $(V_CC) -DERTS_NO_KERNEL_POLL_VERSION $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) -DERTS_NO_KERNEL_POLL_VERSION $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
endif
@@ -863,13 +863,13 @@ endif
$(OBJDIR)/beam_emu.S: beam/beam_emu.c
$(V_EMU_CC) -S -fverbose-asm $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
@@ -765,7 +765,7 @@
# General targets
#
$(OBJDIR)/%.o: beam/%.c
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%.o: beam/emu/%.c
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%.o: beam/jit/%.c
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%.o: $(TARGET)/%.c
$(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@
@@ -881,7 +881,7 @@ $(OBJDIR)/%.o: sys/$(ERLANG_OSTYPE)/%.c
$(V_CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(OBJDIR)/%.o: sys/common/%.c
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
$(OBJDIR)/%.o: drivers/common/%.c
$(V_CC) $(CFLAGS) -DLIBSCTP=$(LIBSCTP) $(INCLUDES) -Idrivers/common -Idrivers/$(ERLANG_OSTYPE) -c $< -o $@
+5 -5
View File
@@ -1,11 +1,11 @@
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
index 96b5da9..e166e89 100644
index 29a26674ba..e6ab453a70 100644
--- a/lib/kernel/src/os.erl
+++ b/lib/kernel/src/os.erl
@@ -313,7 +313,7 @@ mk_cmd(_,Cmd) ->
%% We use an absolute path here because we do not want the path to be
%% searched in case a stale NFS handle is somewhere in the path before
%% the sh command.
@@ -294,7 +294,7 @@ mk_cmd({win32,Wtype}, Cmd) ->
mk_cmd(_,Cmd) ->
%% Have to send command in like this in order to make sh commands like
%% cd and ulimit available
- {"/bin/sh -s unix:cmd", [out],
+ {"@TERMUX_PREFIX@/bin/sh -s unix:cmd", [out],
%% We insert a new line after the command, in case the command
+34
View File
@@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f3f941..7c148ff 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -113,6 +113,8 @@ ELSEIF(NETBSD)
set(CORE_LIBRARIES util resolv execinfo)
ELSEIF(WIN32)
set(CORE_LIBRARIES Ws2_32 Shlwapi dbghelp)
+ELSEIF(ANDROID)
+ set(CORE_LIBRARIES util)
ELSE()
set(CORE_LIBRARIES util resolv)
ENDIF()
@@ -120,7 +122,11 @@ ENDIF()
MACRO(DECORATE_TARGET TARGET_NAME)
add_sanitizers(${TARGET_NAME})
set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/base/Headers.hpp")
- cotire(${TARGET_NAME})
+ IF(ANDROID)
+ # Doesn't work when cross-compiling
+ ELSE()
+ cotire(${TARGET_NAME})
+ ENDIF()
ENDMACRO()
include_directories(
@@ -129,7 +131,6 @@
external_imported/Catch2/single_include
external_imported/cxxopts/include
external_imported/msgpack-c/include
- external_imported/UniversalStacktrace/ust
src/base
src/terminal
src/terminal/forwarding
+5 -5
View File
@@ -2,13 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://eternalterminal.dev
TERMUX_PKG_DESCRIPTION="A remote shell that automatically reconnects without interrupting the session"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=6.0.13
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://github.com/MisterTea/EternalTerminal/archive/et-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=728c3a444d666897c710e33fe473d8d289263a59574451b13aa53ec3c6ac88b3
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+\.\d+\.\d+"
TERMUX_PKG_VERSION=6.1.9
TERMUX_PKG_SRCURL=https://github.com/MisterTea/EternalTerminal/archive/et-v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=b0b758ee57c53d82a4908b12e182bb61778ed685750c61304f0aa99ff174bd8d
TERMUX_PKG_DEPENDS="libc++, protobuf, libsodium, openssl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DDISABLE_VCPKG=1"
TERMUX_PKG_DEPENDS="libc++, protobuf, libsodium"
termux_step_pre_configure() {
termux_setup_protobuf
+30
View File
@@ -0,0 +1,30 @@
diff --git a/src/base/Headers.hpp b/src/base/Headers.hpp
index 43a1903..405f51e 100644
--- a/src/base/Headers.hpp
+++ b/src/base/Headers.hpp
@@ -85,7 +85,9 @@ inline int close(int fd) { return ::closesocket(fd); }
#include "easylogging++.h"
#include "json.hpp"
#include "sole.hpp"
+#if !defined(__ANDROID__)
#include "ust.hpp"
+#endif
#ifdef WITH_UTEMPTER
#include <utempter.h>
@@ -133,9 +135,15 @@ const int CLIENT_KEEP_ALIVE_DURATION = 5;
// allow enough time.
const int SERVER_KEEP_ALIVE_DURATION = 11;
+#if defined(__ANDROID__)
+#define STFATAL LOG(FATAL) << "No Stack Trace on Android" << endl
+
+#define STERROR LOG(ERROR) << "No Stack Trace on Android" << endl
+#else
#define STFATAL LOG(FATAL) << "Stack Trace: " << endl << ust::generate()
#define STERROR LOG(ERROR) << "Stack Trace: " << endl << ust::generate()
+#endif
#ifdef WIN32
inline string WindowsErrnoToString() {
@@ -0,0 +1,13 @@
diff --git a/src/base/TcpSocketHandler.cpp b/src/base/TcpSocketHandler.cpp
index e94f1a2..f1f7b3b 100644
--- a/src/base/TcpSocketHandler.cpp
+++ b/src/base/TcpSocketHandler.cpp
@@ -14,6 +14,8 @@ int TcpSocketHandler::connect(const SocketEndpoint &endpoint) {
hints.ai_socktype = SOCK_STREAM;
#if __NetBSD__
hints.ai_flags = (AI_CANONNAME | AI_ADDRCONFIG);
+#elif defined(__ANDROID__)
+ hints.ai_flags = (AI_CANONNAME | AI_ADDRCONFIG);
#else
hints.ai_flags = (AI_CANONNAME | AI_V4MAPPED | AI_ADDRCONFIG | AI_ALL);
#endif
@@ -0,0 +1,13 @@
diff --git a/src/terminal/ParseConfigFile.hpp b/src/terminal/ParseConfigFile.hpp
index 9b85468..acfa809 100644
--- a/src/terminal/ParseConfigFile.hpp
+++ b/src/terminal/ParseConfigFile.hpp
@@ -34,6 +34,8 @@
#include <sys/time.h>
#endif /* HAVE_SYS_TIME_H */
+#include "Headers.hpp"
+
using namespace std;
#define MAX_LINE_SIZE 1024
@@ -1,18 +0,0 @@
diff --git a/src/terminal/TerminalServerMain.cpp b/src/terminal/TerminalServerMain.cpp
index a8d59c6..23fa0ae 100644
--- a/src/terminal/TerminalServerMain.cpp
+++ b/src/terminal/TerminalServerMain.cpp
@@ -28,11 +28,11 @@ int main(int argc, char **argv) {
("logtostdout", "log to stdout") //
("pidfile", "Location of the pid file",
cxxopts::value<std::string>()->default_value(
- "/var/run/etserver.pid")) //
+ "@TERMUX_PREFIX@/var/run/etserver.pid")) //
("v,verbose", "Enable verbose logging",
cxxopts::value<int>()->default_value("0"), "LEVEL") //
("serverfifo",
- "If set, listens on the matching fifo name", //
+ "If set, listens on the matching server fifo name", //
cxxopts::value<std::string>()->default_value(ROUTER_FIFO_NAME)) //
;
+159
View File
@@ -0,0 +1,159 @@
diff --git a/src/base/Headers.hpp b/src/base/Headers.hpp
index e1cabeb..405f51e 100644
--- a/src/base/Headers.hpp
+++ b/src/base/Headers.hpp
@@ -294,7 +294,7 @@ inline string GetTempDirectory() {
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> > converter;
std::string tmpDir = converter.to_bytes(wstring(buf, retval));
#else
- string tmpDir = "/tmp";
+ string tmpDir = _PATH_TMP;
#endif
return tmpDir;
}
diff --git a/src/htm/HtmClientMain.cpp b/src/htm/HtmClientMain.cpp
index 75599f3..1b7d226 100644
--- a/src/htm/HtmClientMain.cpp
+++ b/src/htm/HtmClientMain.cpp
@@ -64,9 +64,9 @@ int main(int argc, char** argv) {
el::Loggers::setVerboseLevel(3);
// default max log file size is 20MB for etserver
string maxlogsize = "20971520";
- LogHandler::setupLogFile(&defaultConf, "/tmp/htm.log", maxlogsize);
+ LogHandler::setupLogFile(&defaultConf, GetTempDirectory() + "htm.log", maxlogsize);
// Redirect std streams to a file
- LogHandler::stderrToFile("/tmp/htm");
+ LogHandler::stderrToFile(GetTempDirectory() + "htm");
// Reconfigure default logger to apply settings above
el::Loggers::reconfigureLogger("default", defaultConf);
diff --git a/src/htm/HtmServer.cpp b/src/htm/HtmServer.cpp
index 0d96a06..ca4eba9 100644
--- a/src/htm/HtmServer.cpp
+++ b/src/htm/HtmServer.cpp
@@ -176,6 +176,6 @@ void HtmServer::recover() {
string HtmServer::getPipeName() {
uid_t myuid = getuid();
- return string("/tmp/htm.") + to_string(myuid) + string(".ipc");
+ return string(GetTempDirectory() + "htm.") + to_string(myuid) + string(".ipc");
}
} // namespace et
diff --git a/src/htm/HtmServerMain.cpp b/src/htm/HtmServerMain.cpp
index e6ab21f..de57897 100644
--- a/src/htm/HtmServerMain.cpp
+++ b/src/htm/HtmServerMain.cpp
@@ -18,9 +18,9 @@ int main(int argc, char **argv) {
el::Loggers::setVerboseLevel(3);
// default max log file size is 20MB for etserver
string maxlogsize = "20971520";
- LogHandler::setupLogFile(&defaultConf, "/tmp/htmd.log", maxlogsize);
+ LogHandler::setupLogFile(&defaultConf, GetTempDirectory() + "htmd.log", maxlogsize);
// Redirect std streams to a file
- LogHandler::stderrToFile("/tmp/htmd");
+ LogHandler::stderrToFile(GetTempDirectory() + "htmd");
// Reconfigure default logger to apply settings above
el::Loggers::reconfigureLogger("default", defaultConf);
diff --git a/src/terminal/TerminalMain.cpp b/src/terminal/TerminalMain.cpp
index e61f72c..0794516 100644
--- a/src/terminal/TerminalMain.cpp
+++ b/src/terminal/TerminalMain.cpp
@@ -14,7 +14,7 @@ using namespace et;
void setDaemonLogFile(string idpasskey, string daemonType) {
string first_idpass_chars = idpasskey.substr(0, 10);
string logFile =
- string("/tmp/etterminal_") + daemonType + "_" + first_idpass_chars;
+ string(GetTempDirectory() + "etterminal_") + daemonType + "_" + first_idpass_chars;
}
int main(int argc, char** argv) {
@@ -140,7 +140,7 @@ int main(int argc, char** argv) {
// etserver with --jump cannot write to the default log file(root)
LogHandler::setupLogFile(&defaultConf,
- "/tmp/etjump-" + username + "-" + id + ".log",
+ GetTempDirectory() + "etjump-" + username + "-" + id + ".log",
maxlogsize);
// Reconfigure default logger to apply settings above
el::Loggers::reconfigureLogger("default", defaultConf);
@@ -173,7 +173,7 @@ int main(int argc, char** argv) {
// etserver with --idpasskey cannot write to the default log file(root)
LogHandler::setupLogFile(&defaultConf,
- "/tmp/etterminal-" + username + "-" + id + ".log",
+ GetTempDirectory() + "etterminal-" + username + "-" + id + ".log",
maxlogsize);
// Reconfigure default logger to apply settings above
el::Loggers::reconfigureLogger("default", defaultConf);
diff --git a/src/terminal/TerminalServerMain.cpp b/src/terminal/TerminalServerMain.cpp
index a8d59c6..23fa0ae 100644
--- a/src/terminal/TerminalServerMain.cpp
+++ b/src/terminal/TerminalServerMain.cpp
@@ -28,11 +28,11 @@ int main(int argc, char **argv) {
("logtostdout", "log to stdout") //
("pidfile", "Location of the pid file",
cxxopts::value<std::string>()->default_value(
- "/var/run/etserver.pid")) //
+ "@TERMUX_PREFIX@/var/run/etserver.pid")) //
("v,verbose", "Enable verbose logging",
cxxopts::value<int>()->default_value("0"), "LEVEL") //
("serverfifo",
- "If set, listens on the matching fifo name", //
+ "If set, listens on the matching server fifo name", //
cxxopts::value<std::string>()->default_value(ROUTER_FIFO_NAME)) //
;
@@ -58,7 +58,7 @@ int main(int argc, char **argv) {
} else {
defaultConf.setGlobally(el::ConfigurationType::ToStandardOutput, "false");
// Redirect std streams to a file
- LogHandler::stderrToFile("/tmp/etserver");
+ LogHandler::stderrToFile(GetTempDirectory() + "etserver");
}
string serverFifo = ROUTER_FIFO_NAME;
@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
{
const char *fifoName =
- ini.GetValue("Debug", "serverfifo", ROUTER_FIFO_NAME);
+ ini.GetValue("Debug", "serverfifo", ROUTER_FIFO_NAME.c_str());
if (fifoName) {
serverFifo = string(fifoName);
}
@@ -129,7 +129,7 @@ int main(int argc, char **argv) {
}
// Set log file for etserver process here.
- LogHandler::setupLogFile(&defaultConf, "/tmp/etserver-%datetime.log",
+ LogHandler::setupLogFile(&defaultConf, GetTempDirectory() + "etserver-%datetime.log",
maxlogsize);
// Reconfigure default logger to apply settings above
el::Loggers::reconfigureLogger("default", defaultConf);
diff --git a/src/terminal/UserTerminalRouter.hpp b/src/terminal/UserTerminalRouter.hpp
index 511e207..40aa7f9 100644
--- a/src/terminal/UserTerminalRouter.hpp
+++ b/src/terminal/UserTerminalRouter.hpp
@@ -6,7 +6,7 @@
#include "PipeSocketHandler.hpp"
#include "ServerConnection.hpp"
-#define ROUTER_FIFO_NAME "/tmp/etserver.idpasskey.fifo"
+const string ROUTER_FIFO_NAME = GetTempDirectory() + "etserver.idpasskey.fifo";
namespace et {
class UserTerminalRouter {
diff --git a/src/terminal/forwarding/PortForwardHandler.cpp b/src/terminal/forwarding/PortForwardHandler.cpp
index f046a86..b2422c1 100644
--- a/src/terminal/forwarding/PortForwardHandler.cpp
+++ b/src/terminal/forwarding/PortForwardHandler.cpp
@@ -45,7 +45,7 @@ PortForwardSourceResponse PortForwardHandler::createSource(
source = pfsr.source();
} else {
// Make a random file to forward the pipe
- string sourcePattern = string("/tmp/et_forward_sock_XXXXXX");
+ string sourcePattern = GetTempDirectory() + string("et_forward_sock_XXXXXX");
string sourceDirectory = string(mkdtemp(&sourcePattern[0]));
FATAL_FAIL(::chmod(sourceDirectory.c_str(), S_IRUSR | S_IWUSR | S_IXUSR));
FATAL_FAIL(::chown(sourceDirectory.c_str(), userid, groupid));
+4 -3
View File
@@ -2,9 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://exiv2.org/
TERMUX_PKG_DESCRIPTION="Exif, Iptc and XMP metadata manipulation library and tools"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1:0.27.5
TERMUX_PKG_SRCURL=https://github.com/Exiv2/exiv2/archive/v${TERMUX_PKG_VERSION:2}.tar.gz
TERMUX_PKG_SHA256=1da1721f84809e4d37b3f106adb18b70b1b0441c860746ce6812bb3df184ed6c
TERMUX_PKG_VERSION=0.27.5-RC3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/Exiv2/exiv2/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=5101739e9428edc6b660563e76fac8389f44f928d9724770890ac513ca1cc4a7
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="libandroid-support, libc++, libexpat, zlib"
TERMUX_PKG_BREAKS="exiv2-dev"
-13
View File
@@ -1,13 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://www.fetchmail.info/
TERMUX_PKG_DESCRIPTION="A remote-mail retrieval utility"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
TERMUX_PKG_VERSION=6.4.22
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/fetchmail/files/branch_${TERMUX_PKG_VERSION:0:3}/fetchmail-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=cc6818bd59435602169fa292d6d163d56b21c7f53112829470a3aceabe612c84
TERMUX_PKG_DEPENDS="libcrypt, openssl"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ssl=$TERMUX_PREFIX"
termux_step_pre_configure() {
export LIBS="-llog"
}
@@ -1,45 +0,0 @@
diff -uNr fetchmail-6.4.1/fetchmail.h fetchmail-6.4.1.mod/fetchmail.h
--- fetchmail-6.4.1/fetchmail.h 2019-09-28 11:52:03.000000000 +0300
+++ fetchmail-6.4.1.mod/fetchmail.h 2019-10-31 15:03:00.008488320 +0200
@@ -114,7 +114,7 @@
#define MSGBUFSIZE 8192
#define NAMELEN 64 /* max username length */
-#define PASSWORDLEN 256 /* max password length */
+#define FETCHMAIL_PASSWORDLEN 256 /* max password length */
#define DIGESTLEN 33 /* length of MD5 digest */
/* exit code values */
@@ -463,7 +463,7 @@
extern flag configdump; /* dump control blocks as Python dictionary */
extern const char *fetchmailhost; /* either "localhost" or an FQDN */
extern int suppress_tags; /* suppress tags in tagged protocols? */
-extern char shroud[PASSWORDLEN*2+3]; /* string to shroud in debug output */
+extern char shroud[FETCHMAIL_PASSWORDLEN*2+3]; /* string to shroud in debug output */
#ifdef SDPS_ENABLE
extern char *sdps_envfrom;
extern char *sdps_envto;
diff -uNr fetchmail-6.4.1/getpass.c fetchmail-6.4.1.mod/getpass.c
--- fetchmail-6.4.1/getpass.c 2019-08-24 11:49:43.000000000 +0300
+++ fetchmail-6.4.1.mod/getpass.c 2019-10-31 15:03:10.211855090 +0200
@@ -24,7 +24,7 @@
#include "fetchmail.h"
#include "i18n.h"
-#define INPUT_BUF_SIZE PASSWORDLEN
+#define INPUT_BUF_SIZE FETCHMAIL_PASSWORDLEN
#if defined(HAVE_TERMIOS_H) && defined(HAVE_TCSETATTR)
# include <termios.h>
diff -uNr fetchmail-6.4.1/transact.c fetchmail-6.4.1.mod/transact.c
--- fetchmail-6.4.1/transact.c 2019-08-28 01:30:05.000000000 +0300
+++ fetchmail-6.4.1.mod/transact.c 2019-10-31 15:03:15.288538378 +0200
@@ -56,7 +56,7 @@
/** Macro to generate the tag and store it in #tag. */
#define GENSYM (sprintf(tag, "A%04u", ++tagnum % TAGMOD), tag)
static const struct method *protocol; /**< description of the protocol used for the current poll */
-char shroud[PASSWORDLEN*2+3]; /**< string to shroud in debug output */
+char shroud[FETCHMAIL_PASSWORDLEN*2+3]; /**< string to shroud in debug output */
/* session variables initialized in do_session() */
int mytimeout; /**< value of nonreponse timeout */
-33
View File
@@ -1,33 +0,0 @@
diff -uNr fetchmail-6.3.26/Makefile.am fetchmail-6.3.26.mod/Makefile.am
--- fetchmail-6.3.26/Makefile.am 2013-04-23 23:00:45.000000000 +0300
+++ fetchmail-6.3.26.mod/Makefile.am 2019-07-01 23:34:02.456251878 +0300
@@ -190,7 +190,7 @@
Doxyfile
fetchmailconf:
- ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
+ ( echo '#! /bin/sh' && echo 'exec python2 @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
diff -uNr fetchmail-6.3.26/Makefile.in fetchmail-6.3.26.mod/Makefile.in
--- fetchmail-6.3.26/Makefile.in 2013-04-24 00:36:56.000000000 +0300
+++ fetchmail-6.3.26.mod/Makefile.in 2019-07-01 23:33:45.826122087 +0300
@@ -1754,7 +1754,7 @@
$(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
fetchmailconf:
- ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
+ ( echo '#! /bin/sh' && echo 'exec python2 @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
diff -uNr fetchmail-6.3.26/fetchmailconf.py fetchmail-6.3.26.mod/fetchmailconf.py
--- fetchmail-6.3.26/fetchmailconf.py 2013-04-23 23:00:45.000000000 +0300
+++ fetchmail-6.3.26.mod/fetchmailconf.py 2019-07-01 23:21:00.873525116 +0300
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
#
# A GUI configurator for generating fetchmail configuration files.
# by Eric S. Raymond, <esr@snark.thyrsus.com>,
+10 -11
View File
@@ -3,9 +3,10 @@ TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multim
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
# NOTE: mpv has to be rebuilt and version bumped after updating ffmpeg.
TERMUX_PKG_VERSION=4.4.1
TERMUX_PKG_VERSION=4.4
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02
TERMUX_PKG_SHA256=06b10a183ce5371f915c6bb15b7b1fffbe046e8275099c96affc29e17645d909
TERMUX_PKG_DEPENDS="libaom, libass, libbz2, libdav1d, libiconv, librav1e, libsoxr, libx264, libx265, xvidcore, libvorbis, libmp3lame, libopus, libvpx, libgnutls, libandroid-glob, freetype, zlib, liblzma, libvidstab, libwebp"
TERMUX_PKG_CONFLICTS="libav"
TERMUX_PKG_BREAKS="ffmpeg-dev"
@@ -36,14 +37,11 @@ termux_step_configure() {
fi
$TERMUX_PKG_SRCDIR/configure \
--arch="${_ARCH}" \
--as="$AS" \
--cc="$CC" \
--cxx="$CXX" \
--nm="$NM" \
--pkg-config="$PKG_CONFIG" \
--strip="$STRIP" \
--cross-prefix="${TERMUX_HOST_PLATFORM}-" \
--arch=${_ARCH} \
--as=$AS \
--cc=$CC \
--cxx=$CXX \
--cross-prefix=${TERMUX_HOST_PLATFORM}- \
--disable-indevs \
--disable-outdevs \
--enable-indev=lavfi \
@@ -68,8 +66,9 @@ termux_step_configure() {
--enable-libvpx \
--enable-libwebp \
--enable-shared \
--prefix="$TERMUX_PREFIX" \
--prefix=$TERMUX_PREFIX \
--target-os=android \
--extra-libs="-landroid-glob" \
$_EXTRA_CONFIGURE_FLAGS
}
+2 -2
View File
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://fly.io
TERMUX_PKG_DESCRIPTION="Command line tools for fly.io services"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="Yaksh Bariya <yakshbari4@gmail.com>"
TERMUX_PKG_VERSION=0.0.250
TERMUX_PKG_VERSION=0.0.248
TERMUX_PKG_SRCURL=https://github.com/superfly/flyctl/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=396f60f6f536aa4f4e9590ed5ae584bf5f9c194145f3d0d12cf4ac8da5b6b70e
TERMUX_PKG_SHA256=00e7386e2b4960d5f2c70ef2d909b01210095c3b01c742db113b7cd90263068c
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_BLACKLISTED_ARCHES="i686, arm"
+1 -1
View File
@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_LICENSE_FILE="COPYRIGHT-BSD2.txt"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.16
TERMUX_PKG_SRCURL=https://www.fossil-scm.org/home/tarball/version-$TERMUX_PKG_VERSION/fossil-src-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SRCURL=https://fossil-scm.org/home/tarball/7aedd5675883d4412cf20917d340b6985e3ecb842e88a39f135df034b2d5f4d3/fossil-src-2.16.tar.gz
TERMUX_PKG_SHA256=fab37e8093932b06b586e99a792bf9b20d00d530764b5bddb1d9a63c8cdafa14
TERMUX_PKG_DEPENDS="libsqlite, openssl, zlib"
+2 -2
View File
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/junegunn/fzf
TERMUX_PKG_DESCRIPTION="Command-line fuzzy finder"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.28.0
TERMUX_PKG_VERSION=0.27.3
TERMUX_PKG_SRCURL=https://github.com/junegunn/fzf/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=05bbfa4dd84b72e55afc3fe56c0fc185d6dd1fa1c4eef56a1559b68341f3d029
TERMUX_PKG_SHA256=a0ad8dc6dd5c7a0c87ad623c0d9164cc2861489b76cb7a8b66f51cb4f9a81254
TERMUX_PKG_AUTO_UPDATE=true
# Depend on findutils as fzf uses the -fstype option, which busybox
+1 -1
View File
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Data flow based image processing framework"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.4.32
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://download.gimp.org/pub/gegl/${TERMUX_PKG_VERSION:0:3}/gegl-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=668e3c6b9faf75fb00512701c36274ab6f22a8ba05ec62dbf187d34b8d298fa1
TERMUX_PKG_DEPENDS="libandroid-support, libc++, ffmpeg, babl, json-glib, libjpeg-turbo, libpng, libjasper, littlecms, libtiff, librsvg, zlib"
+1 -1
View File
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="GNU Internationalization utilities"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.21
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gettext/gettext-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
TERMUX_PKG_DEPENDS="libc++, libiconv, pcre, liblzma, libxml2, libcroco, ncurses, libunistring, zlib"

Some files were not shown because too many files have changed in this diff Show More