Merge branch 'monorepo'
Keep termux-root-packages and x11-packages build recipes in termux-packages as well. There's not really any reason to keep the "official" repositories separated, since the same maintainers tend to work on all of them. Note that only git repositories are merged, the packages eill continue to stay in separate apt repos. Changed packages from each repo/folder are parsed one after the other. A new 'repo.json' file is added which contains packages recipe directory and it's respective apt repo it bwlongs to in a key value format. jq is also being installed now on the docker image in order to bw able to parse the json file.
This commit is contained in:
commit
3092819427
286
.github/workflows/packages.yml
vendored
286
.github/workflows/packages.yml
vendored
@ -6,9 +6,13 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- 'packages/**'
|
||||
- 'root-packages/**'
|
||||
- 'x11-packages/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'packages/**'
|
||||
- 'root-packages/**'
|
||||
- 'x11-packages/**'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
packages:
|
||||
@ -27,7 +31,7 @@ jobs:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 1000
|
||||
- name: Gather build summary
|
||||
@ -73,58 +77,76 @@ jobs:
|
||||
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
|
||||
|
||||
for repo_path in $(jq --raw-output 'keys | .[]' < repo.json); do
|
||||
repo=$(jq --raw-output '.["'${repo_path}'"]' < repo.json)
|
||||
# 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 == ${repo_path}/* ]]; then
|
||||
# This file does not belong to a package, so ignore it
|
||||
continue
|
||||
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
|
||||
if [[ $file =~ ^${repo_path}/([.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 "${repo_path}/${pkg}/${subpkg}.subpackage.sh" ]; then
|
||||
echo "$subpkg" >> ./deleted_${repo}_packages.txt
|
||||
fi
|
||||
elif [[ $file =~ ^${repo_path}/([.a-z0-9+-]*)/.*$ ]]; then
|
||||
# package, check if it was deleted or updated
|
||||
pkg=${BASH_REMATCH[1]}
|
||||
if [ -d "${repo_path}/${pkg}" ]; then
|
||||
echo "$pkg" >> ./built_${repo}_packages.txt
|
||||
# If there are subpackages we want to create a list of those
|
||||
# as well
|
||||
for file in $(find "${repo_path}/${pkg}/" -maxdepth 1 -type f -name \*.subpackage.sh | sort); do
|
||||
echo "$(basename "${file%%.subpackage.sh}")" >> ./built_${repo}_subpackages.txt
|
||||
done
|
||||
else
|
||||
echo "$pkg" >> ./deleted_${repo}_packages
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done<<<${CHANGED_FILES}
|
||||
done<<<${CHANGED_FILES}
|
||||
done
|
||||
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
|
||||
repo_paths=$(jq --raw-output 'keys | .[]' < repo.json)
|
||||
found=false
|
||||
for repo_path in $repo_paths; do
|
||||
repo=$(jq --raw-output '.["'${repo_path}'"]' < repo.json)
|
||||
if [ -d "${repo_path}/${pkg}" ]; then
|
||||
found=true
|
||||
echo "$pkg" >> ./built_${repo}_packages.txt
|
||||
for subpkg in $(find "${repo_path}/${pkg}/" -maxdepth 1 -type f -name \*.subpackage.sh | sort); do
|
||||
echo "$(basename "${subpkg%%.subpackage.sh}")" >> ./built_${repo}_subpackages.txt
|
||||
done
|
||||
fi
|
||||
done
|
||||
if [ "$found" != true ]; then
|
||||
echo "Package '${pkg}' not found in any of the repo"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Fix so that lists do not contain duplicates
|
||||
if [ -f ./built_packages.txt ]; then
|
||||
uniq ./built_packages.txt > ./built_packages.txt.tmp
|
||||
mv ./built_packages.txt.tmp ./built_packages.txt
|
||||
fi
|
||||
if [ -f ./built_subpackages.txt ]; then
|
||||
uniq ./built_subpackages.txt > ./built_subpackages.txt.tmp
|
||||
mv ./built_subpackages.txt.tmp ./built_subpackages.txt
|
||||
fi
|
||||
if [ -f ./deleted_packages.txt ]; then
|
||||
uniq ./deleted_packages.txt > ./deleted_packages.txt.tmp
|
||||
mv ./deleted_packages.txt.tmp ./deleted_packages.txt
|
||||
fi
|
||||
for repo in $(jq --raw-output '.[]' < repo.json); do
|
||||
# Fix so that lists do not contain duplicates
|
||||
if [ -f ./built_${repo}_packages.txt ]; then
|
||||
uniq ./built_${repo}_packages.txt > ./built_${repo}_packages.txt.tmp
|
||||
mv ./built_${repo}_packages.txt.tmp ./built_${repo}_packages.txt
|
||||
fi
|
||||
if [ -f ./built_${repo}_subpackages.txt ]; then
|
||||
uniq ./built_${repo}_subpackages.txt > ./built_${repo}_subpackages.txt.tmp
|
||||
mv ./built_${repo}_subpackages.txt.tmp ./built_${repo}_subpackages.txt
|
||||
fi
|
||||
if [ -f ./deleted_${repo}_packages.txt ]; then
|
||||
uniq ./deleted_${repo}_packages.txt > ./deleted_${repo}_packages.txt.tmp
|
||||
mv ./deleted_${repo}_packages.txt.tmp ./deleted_${repo}_packages.txt
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Free additional disk space (if necessary)
|
||||
run: |
|
||||
@ -136,32 +158,51 @@ jobs:
|
||||
sudo rm -rf /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
- name: Lint packages
|
||||
run: |
|
||||
if [ -f ./built_packages.txt ]; then
|
||||
./scripts/lint-packages.sh $(cat ./built_packages.txt | awk '{print "packages/"$1"/build.sh"}')
|
||||
./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} $(cat ./built_packages.txt)
|
||||
fi
|
||||
declare -a package_recipes
|
||||
for repo_path in $(jq --raw-output 'keys | .[]' < repo.json); do
|
||||
repo=$(jq --raw-output '.["'${repo_path}'"]' < repo.json)
|
||||
if [ -f ./built_${repo}_packages.txt ]; then
|
||||
package_recipes="$package_recipes $(cat ./built_${repo}_packages.txt | repo_path=${repo_path} awk '{print ENVIRON["repo_path"]"/"$1"/build.sh"}')"
|
||||
fi
|
||||
done
|
||||
|
||||
./scripts/lint-packages.sh $package_recipes
|
||||
|
||||
- name: Build packages
|
||||
run: |
|
||||
declare -a packages
|
||||
for repo_path in $(jq --raw-output 'keys | .[]' < repo.json); do
|
||||
repo=$(jq --raw-output '.["'${repo_path}'"]' < repo.json)
|
||||
|
||||
if [ -f ./built_${repo}_packages.txt ]; then
|
||||
packages="$packages $(cat ./built_${repo}_packages.txt)"
|
||||
fi
|
||||
done
|
||||
|
||||
./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} $packages
|
||||
|
||||
- name: Generate build artifacts
|
||||
if: always()
|
||||
run: |
|
||||
mkdir -p debs
|
||||
test -d termux-packages/output && mv termux-packages/output/* ./output/
|
||||
|
||||
# Put package lists into directory with *.deb files so they will be transferred to
|
||||
# upload job.
|
||||
test -f ./built_packages.txt && mv ./built_packages.txt ./debs/
|
||||
test -f ./built_subpackages.txt && cat ./built_subpackages.txt >> ./debs/built_packages.txt \
|
||||
&& rm ./built_subpackages.txt
|
||||
test -f ./deleted_packages.txt && mv ./deleted_packages.txt ./debs/
|
||||
for repo in $(jq --raw-output '.[]' < repo.json); do
|
||||
# Put package lists into directory with *.deb files so they will be transferred to
|
||||
# upload job.
|
||||
test -f ./built_${repo}_packages.txt && mv ./built_${repo}_packages.txt ./debs/
|
||||
test -f ./built_${repo}_subpackages.txt && cat ./built_${repo}_subpackages.txt >> ./debs/built_${repo}_packages.txt \
|
||||
&& rm ./built_${repo}_subpackages.txt
|
||||
test -f ./deleted_${repo}_packages.txt && mv ./deleted_${repo}_packages.txt ./debs/
|
||||
|
||||
# Move only debs from built_packages into debs/ folder before
|
||||
# creating an archive.
|
||||
while read -r pkg; do
|
||||
# Match both $pkg.deb and $pkg-static.deb.
|
||||
find output \( -name "$pkg_*.deb" -o -name "$pkg-static_*.deb" \) -type f -print0 | xargs -0r mv -t debs/
|
||||
done < <(cat ./debs/built_packages.txt)
|
||||
# Move only debs from built_packages into debs/ folder before
|
||||
# creating an archive.
|
||||
while read -r pkg; do
|
||||
# Match both $pkg.deb and $pkg-static.deb.
|
||||
find output \( -name "$pkg_*.deb" -o -name "$pkg-static_*.deb" \) -type f -print0 | xargs -0r mv -t debs/
|
||||
done < <(cat ./debs/built_${repo}_packages.txt)
|
||||
done
|
||||
|
||||
# Files containing certain symbols (e.g. ":") will cause failure in actions/upload-artifact.
|
||||
# Archiving *.deb files in a tarball to avoid issues with uploading.
|
||||
@ -172,9 +213,9 @@ jobs:
|
||||
find debs -type f -name "*.deb" -exec sha256sum "{}" \; | sort -k2
|
||||
- name: Store *.deb files
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: termux-packages-${{ matrix.target_arch }}-${{ github.sha }}
|
||||
name: debs-${{ matrix.target_arch }}-${{ github.sha }}
|
||||
path: ./artifacts
|
||||
|
||||
upload:
|
||||
@ -183,14 +224,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Get *.deb files
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: ./
|
||||
- name: Upload to packages.termux.org
|
||||
env:
|
||||
REPOSITORY_NAME: termux-main
|
||||
REPOSITORY_DISTRIBUTION: stable
|
||||
REPOSITORY_URL: https://packages.termux.org/aptly-api
|
||||
run: |
|
||||
@ -200,41 +240,44 @@ jobs:
|
||||
|
||||
source scripts/aptly_api.sh
|
||||
|
||||
for archive in termux-packages-*/*.tar; do
|
||||
for archive in debs-*/debs-{aarch64,arm,i686,x86_64}-${{ github.sha }}.tar; do
|
||||
tar xf "$archive"
|
||||
done
|
||||
|
||||
# Upload file to temporary directory.
|
||||
uploaded_files=false
|
||||
shopt -s nullglob
|
||||
for filename in $(cat debs/built_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
||||
if ! aptly_upload_file "$filename"; then
|
||||
exit 1
|
||||
fi
|
||||
for repo in $(jq --raw-output '.[]' < repo.json); do
|
||||
export REPOSITORY_NAME=$repo
|
||||
|
||||
uploaded_files=true
|
||||
# Upload file to temporary directory.
|
||||
uploaded_files=false
|
||||
shopt -s nullglob
|
||||
for filename in $(cat debs/built_${repo}_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
||||
if ! aptly_upload_file "$filename"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uploaded_files=true
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
# Publishing repository changes.
|
||||
if [ "$uploaded_files" = "true" ]; then
|
||||
if ! aptly_add_to_repo; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Usually temporary directory is deleted automatically, but in certain cases it is left.
|
||||
aptly_delete_dir
|
||||
|
||||
# Final part to make changes appear in web root.
|
||||
if ! aptly_publish_repo; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
# Publishing repository changes.
|
||||
if [ "$uploaded_files" = "true" ]; then
|
||||
if ! aptly_add_to_repo; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Usually temporary directory is deleted automatically, but in certain cases it is left.
|
||||
aptly_delete_dir
|
||||
|
||||
# Final part to make changes appear in web root.
|
||||
if ! aptly_publish_repo; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
- name: Upload to grimler.se
|
||||
# Run even if upload to packages.termux.org failed:
|
||||
if: always()
|
||||
env:
|
||||
REPOSITORY_NAME: termux-main
|
||||
REPOSITORY_DISTRIBUTION: stable
|
||||
REPOSITORY_URL: https://aptly-api.grimler.se
|
||||
run: |
|
||||
@ -243,30 +286,35 @@ jobs:
|
||||
|
||||
source scripts/aptly_api.sh
|
||||
|
||||
# Upload file to temporary directory.
|
||||
uploaded_files=false
|
||||
shopt -s nullglob
|
||||
for filename in $(cat debs/built_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
||||
if ! aptly_upload_file "$filename"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uploaded_files=true
|
||||
for repo in $(jq --raw-output '.[]' < repo.json); do
|
||||
export REPOSITORY_NAME=$repo
|
||||
|
||||
# Upload file to temporary directory.
|
||||
uploaded_files=false
|
||||
shopt -s nullglob
|
||||
for filename in $(cat debs/built_${repo}_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
||||
if ! aptly_upload_file "$filename"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
uploaded_files=true
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
# Publishing repository changes.
|
||||
if [ "$uploaded_files" = "true" ]; then
|
||||
if ! aptly_add_to_repo; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Usually temporary directory is deleted automatically, but in certain cases it is left.
|
||||
aptly_delete_dir
|
||||
|
||||
# grimler.se mirror is signed manually, can't publish
|
||||
# through CI
|
||||
# if ! aptly_publish_repo; then
|
||||
# exit 1
|
||||
# fi
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
# Publishing repository changes.
|
||||
if [ "$uploaded_files" = "true" ]; then
|
||||
if ! aptly_add_to_repo; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Usually temporary directory is deleted automatically, but in certain cases it is left.
|
||||
aptly_delete_dir
|
||||
|
||||
# grimler.se mirror is signed manually, can't publish
|
||||
# through CI
|
||||
# if ! aptly_publish_repo; then
|
||||
# exit 1
|
||||
# fi
|
||||
fi
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,3 +19,5 @@ scripts/.vagrant/
|
||||
|
||||
# Predownloaded packages sources.
|
||||
/packages/*/cache
|
||||
/root-packages/*/cache
|
||||
/x11-packages/*/cache
|
||||
|
@ -39,6 +39,8 @@ if [ ! -e "$TERMUX_BUILD_LOCK_FILE" ]; then
|
||||
touch "$TERMUX_BUILD_LOCK_FILE"
|
||||
fi
|
||||
|
||||
export TERMUX_PACKAGES_DIRECTORIES=$(jq --raw-output 'keys | .[]' < ${TERMUX_SCRIPTDIR}/repo.json)
|
||||
|
||||
# Special variable for internal use. It forces script to ignore
|
||||
# lock file.
|
||||
: "${TERMUX_BUILD_IGNORE_LOCK:=false}"
|
||||
@ -451,17 +453,24 @@ for ((i=0; i<${#PACKAGE_LIST[@]}; i++)); do
|
||||
|
||||
# Check the package to build:
|
||||
TERMUX_PKG_NAME=$(basename "${PACKAGE_LIST[i]}")
|
||||
export TERMUX_PKG_BUILDER_DIR=
|
||||
if [[ ${PACKAGE_LIST[i]} == *"/"* ]]; then
|
||||
# Path to directory which may be outside this repo:
|
||||
if [ ! -d "${PACKAGE_LIST[i]}" ]; then termux_error_exit "'${PACKAGE_LIST[i]}' seems to be a path but is not a directory"; fi
|
||||
export TERMUX_PKG_BUILDER_DIR
|
||||
TERMUX_PKG_BUILDER_DIR=$(realpath "${PACKAGE_LIST[i]}")
|
||||
export TERMUX_PKG_BUILDER_DIR=$(realpath "${PACKAGE_LIST[i]}")
|
||||
else
|
||||
# Package name:
|
||||
if [ -n "${TERMUX_IS_DISABLED=""}" ]; then
|
||||
export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/disabled-packages/$TERMUX_PKG_NAME
|
||||
else
|
||||
export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/packages/$TERMUX_PKG_NAME
|
||||
for package_directory in $TERMUX_PACKAGES_DIRECTORIES; do
|
||||
if [ -d "${TERMUX_SCRIPTDIR}/${package_directory}/${TERMUX_PKG_NAME}" ]; then
|
||||
export TERMUX_PKG_BUILDER_DIR=${TERMUX_SCRIPTDIR}/$package_directory/$TERMUX_PKG_NAME
|
||||
break
|
||||
elif [ -n "${TERMUX_IS_DISABLED=""}" ] && [ -d "${TERMUX_SCRIPTDIR}/disabled-packages/${TERMUX_PKG_NAME}"]; then
|
||||
export TERMUX_PKG_BUILDER_DIR=$TERMUX_SCRIPTDIR/disabled-packages/$TERMUX_PKG_NAME
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "${TERMUX_PKG_BUILDER_DIR}" ]; then
|
||||
termux_error_exit "No package $TERMUX_PKG_NAME found in any of the enabled repositories. Are you trying to set up a custom repository?"
|
||||
fi
|
||||
fi
|
||||
TERMUX_PKG_BUILDER_SCRIPT=$TERMUX_PKG_BUILDER_DIR/build.sh
|
||||
|
5
repo.json
Normal file
5
repo.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"packages": "termux-main",
|
||||
"root-packages": "termux-root",
|
||||
"x11-packages": "termux-x11"
|
||||
}
|
22
root-packages/aircrack-ng/build.sh
Normal file
22
root-packages/aircrack-ng/build.sh
Normal file
@ -0,0 +1,22 @@
|
||||
TERMUX_PKG_HOMEPAGE="https://www.aircrack-ng.org/"
|
||||
TERMUX_PKG_DESCRIPTION="WiFi security auditing tools suite"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Marlin Sööse <marlin.soose@laro.se>"
|
||||
_COMMIT=f94a3fe3f1c74938169317a6395b7f72452499c4
|
||||
TERMUX_PKG_VERSION="2:2021.12.19-${_COMMIT:0:8}"
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL="https://github.com/aircrack-ng/aircrack-ng/archive/$_COMMIT.tar.gz"
|
||||
TERMUX_PKG_SHA256="d79c02351fe389c41e6c29ef4381109f78ae5f3ba552f776ee08b6a3cbd3aa13"
|
||||
TERMUX_PKG_DEPENDS="libc++, libnl, openssl, libpcap"
|
||||
# static build gives errors:
|
||||
# error: undefined reference to 'ac_crypto_engine_init'
|
||||
# error: cannot find the library 'libaircrack-ce-wpa.la' or unhandled argument 'libaircrack-ce-wpa.la'
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-static"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
ln -sf libaircrack-ce-wpa-1.6.0.so $TERMUX_PREFIX/lib/libaircrack-ce-wpa.so
|
||||
}
|
11
root-packages/aircrack-ng/osdep-find-lib-fix.patch
Normal file
11
root-packages/aircrack-ng/osdep-find-lib-fix.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../osdep-Makefile.inc.orig 2021-01-05 11:01:19.954675451 +0000
|
||||
+++ ./lib/osdep/Makefile.inc 2021-01-05 11:01:30.914916657 +0000
|
||||
@@ -96,7 +96,7 @@
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES += libaircrack-osdep.la
|
||||
-libaircrack_osdep_la_LDFLAGS = -release $(LT_VER) -no-undefined
|
||||
+libaircrack_osdep_la_LDFLAGS = -no-undefined
|
||||
libaircrack_osdep_la_CPPFLAGS = -I$(top_srcdir)/include/aircrack-ng/osdep $(AM_CPPFLAGS)
|
||||
|
||||
EXTRA_DIST += %D%/openbsd.c \
|
11
root-packages/arp-scan/Makefile.am.patch
Normal file
11
root-packages/arp-scan/Makefile.am.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../Makefile.am.orig 2018-12-10 09:34:44.539940037 +0100
|
||||
+++ ./Makefile.am 2018-12-10 09:35:23.876606447 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
dist_man_MANS = arp-scan.1 get-oui.1 get-iab.1 arp-fingerprint.1 mac-vendor.5
|
||||
#
|
||||
-arp_scan_SOURCES = arp-scan.c arp-scan.h error.c wrappers.c utils.c mt19937ar.c
|
||||
+arp_scan_SOURCES = arp-scan.c arp-scan.h error.c wrappers.c utils.c mt19937ar.c hcreate.c hcreate_r.c hsearch_r.c hdestroy_r.c
|
||||
arp_scan_LDADD = $(LIBOBJS)
|
||||
#
|
||||
dist_pkgdata_DATA = ieee-oui.txt ieee-iab.txt mac-vendor.txt
|
13
root-packages/arp-scan/arp-scan.h.patch
Normal file
13
root-packages/arp-scan/arp-scan.h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- ../arp-scan.h.orig 2018-12-10 09:28:18.243276170 +0100
|
||||
+++ ./arp-scan.h 2018-12-10 09:32:43.409940919 +0100
|
||||
@@ -122,9 +122,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifdef HAVE_SEARCH_H
|
||||
-#include <search.h>
|
||||
-#endif
|
||||
+#include "search.h"
|
||||
|
||||
/* Defines */
|
||||
|
22
root-packages/arp-scan/build.sh
Normal file
22
root-packages/arp-scan/build.sh
Normal file
@ -0,0 +1,22 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/royhills/arp-scan
|
||||
TERMUX_PKG_DESCRIPTION="arp-scan is a command-line tool for system discovery and fingerprinting. It constructs and sends ARP requests to the specified IP addresses, and displays any responses that are received."
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.9.7
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/royhills/arp-scan/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=e03c36e4933c655bd0e4a841272554a347cd0136faf42c4a6564059e0761c039
|
||||
TERMUX_PKG_DEPENDS="libpcap"
|
||||
|
||||
if [[ ${TERMUX_ARCH_BITS} == 32 ]]; then
|
||||
# Retrieved from compilation on device:
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="pgac_cv_snprintf_long_long_int_format=%lld"
|
||||
fi
|
||||
|
||||
termux_step_pre_configure () {
|
||||
cp ${TERMUX_PKG_BUILDER_DIR}/hsearch/* ${TERMUX_PKG_SRCDIR}/
|
||||
aclocal
|
||||
autoheader
|
||||
automake --add-missing
|
||||
autoconf
|
||||
}
|
1
root-packages/arp-scan/hsearch/README.md
Normal file
1
root-packages/arp-scan/hsearch/README.md
Normal file
@ -0,0 +1 @@
|
||||
This hsearch(3) implementation is mostly based on the one present in FreeBSD 11.1.
|
72
root-packages/arp-scan/hsearch/hcreate.c
Normal file
72
root-packages/arp-scan/hsearch/hcreate.c
Normal file
@ -0,0 +1,72 @@
|
||||
/*-
|
||||
* Copyright (c) 2015 Nuxi, https://nuxi.nl/
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#include "search.h"
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/*
|
||||
* Thread unsafe interface: use a single process-wide hash table and
|
||||
* forward calls to *_r() functions.
|
||||
*/
|
||||
|
||||
static struct hsearch_data global_hashtable;
|
||||
static bool global_hashtable_initialized = false;
|
||||
|
||||
int
|
||||
hcreate(size_t nel)
|
||||
{
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
hdestroy(void)
|
||||
{
|
||||
|
||||
/* Destroy global hash table if present. */
|
||||
if (global_hashtable_initialized) {
|
||||
hdestroy_r(&global_hashtable);
|
||||
global_hashtable_initialized = false;
|
||||
}
|
||||
}
|
||||
|
||||
ENTRY *
|
||||
hsearch(ENTRY item, ACTION action)
|
||||
{
|
||||
ENTRY *retval;
|
||||
|
||||
/* Create global hash table if needed. */
|
||||
if (!global_hashtable_initialized) {
|
||||
if (hcreate_r(0, &global_hashtable) == 0)
|
||||
return (NULL);
|
||||
global_hashtable_initialized = true;
|
||||
}
|
||||
if (hsearch_r(item, action, &retval, &global_hashtable) == 0)
|
||||
return (NULL);
|
||||
return (retval);
|
||||
}
|
63
root-packages/arp-scan/hsearch/hcreate_r.c
Normal file
63
root-packages/arp-scan/hsearch/hcreate_r.c
Normal file
@ -0,0 +1,63 @@
|
||||
/*-
|
||||
* Copyright (c) 2015 Nuxi, https://nuxi.nl/
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
//__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "search.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hsearch.h"
|
||||
|
||||
int
|
||||
hcreate_r(size_t nel, struct hsearch_data *htab)
|
||||
{
|
||||
struct __hsearch *hsearch;
|
||||
|
||||
/*
|
||||
* Allocate a hash table object. Ignore the provided hint and start
|
||||
* off with a table of sixteen entries. In most cases this hint is
|
||||
* just a wild guess. Resizing the table dynamically if the use
|
||||
* increases a threshold does not affect the worst-case running time.
|
||||
*/
|
||||
hsearch = malloc(sizeof(*hsearch));
|
||||
if (hsearch == NULL)
|
||||
return 0;
|
||||
hsearch->entries = calloc(16, sizeof(ENTRY));
|
||||
if (hsearch->entries == NULL) {
|
||||
free(hsearch);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Pick a random initialization for the FNV-1a hashing. This makes it
|
||||
* hard to come up with a fixed set of keys to force hash collisions.
|
||||
*/
|
||||
arc4random_buf(&hsearch->offset_basis, sizeof(hsearch->offset_basis));
|
||||
hsearch->index_mask = 0xf;
|
||||
hsearch->entries_used = 0;
|
||||
htab->__hsearch = hsearch;
|
||||
return 1;
|
||||
}
|
43
root-packages/arp-scan/hsearch/hdestroy_r.c
Normal file
43
root-packages/arp-scan/hsearch/hdestroy_r.c
Normal file
@ -0,0 +1,43 @@
|
||||
/*-
|
||||
* Copyright (c) 2015 Nuxi, https://nuxi.nl/
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
//__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "search.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hsearch.h"
|
||||
|
||||
void
|
||||
hdestroy_r(struct hsearch_data *htab)
|
||||
{
|
||||
struct __hsearch *hsearch;
|
||||
|
||||
/* Free hash table object and its entries. */
|
||||
hsearch = htab->__hsearch;
|
||||
free(hsearch->entries);
|
||||
free(hsearch);
|
||||
}
|
40
root-packages/arp-scan/hsearch/hsearch.h
Normal file
40
root-packages/arp-scan/hsearch/hsearch.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*-
|
||||
* Copyright (c) 2015 Nuxi, https://nuxi.nl/
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef HSEARCH_H
|
||||
#define HSEARCH_H
|
||||
|
||||
#include "search.h"
|
||||
|
||||
struct __hsearch {
|
||||
size_t offset_basis; /* Initial value for FNV-1a hashing. */
|
||||
size_t index_mask; /* Bitmask for indexing the table. */
|
||||
size_t entries_used; /* Number of entries currently used. */
|
||||
ENTRY *entries; /* Hash table entries. */
|
||||
};
|
||||
|
||||
#endif
|
150
root-packages/arp-scan/hsearch/hsearch_r.c
Normal file
150
root-packages/arp-scan/hsearch/hsearch_r.c
Normal file
@ -0,0 +1,150 @@
|
||||
/*-
|
||||
* Copyright (c) 2015 Nuxi, https://nuxi.nl/
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
//__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include "search.h"
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "hsearch.h"
|
||||
|
||||
/*
|
||||
* Look up an unused entry in the hash table for a given hash. For this
|
||||
* implementation we use quadratic probing. Quadratic probing has the
|
||||
* advantage of preventing primary clustering.
|
||||
*/
|
||||
static ENTRY *
|
||||
hsearch_lookup_free(struct __hsearch *hsearch, size_t hash)
|
||||
{
|
||||
size_t index, i;
|
||||
|
||||
for (index = hash, i = 0;; index += ++i) {
|
||||
ENTRY *entry = &hsearch->entries[index & hsearch->index_mask];
|
||||
if (entry->key == NULL)
|
||||
return (entry);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Computes an FNV-1a hash of the key. Depending on the pointer size, this
|
||||
* either uses the 32- or 64-bit FNV prime.
|
||||
*/
|
||||
static size_t
|
||||
hsearch_hash(size_t offset_basis, const char *str)
|
||||
{
|
||||
size_t hash;
|
||||
|
||||
hash = offset_basis;
|
||||
while (*str != '\0') {
|
||||
hash ^= (uint8_t)*str++;
|
||||
if (sizeof(size_t) * CHAR_BIT <= 32)
|
||||
hash *= UINT32_C(16777619);
|
||||
else
|
||||
hash *= UINT64_C(1099511628211);
|
||||
}
|
||||
return (hash);
|
||||
}
|
||||
|
||||
int
|
||||
hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab)
|
||||
{
|
||||
struct __hsearch *hsearch;
|
||||
ENTRY *entry, *old_entries, *new_entries;
|
||||
size_t hash, index, i, old_hash, old_count, new_count;
|
||||
|
||||
hsearch = htab->__hsearch;
|
||||
hash = hsearch_hash(hsearch->offset_basis, item.key);
|
||||
|
||||
/*
|
||||
* Search the hash table for an existing entry for this key.
|
||||
* Stop searching if we run into an unused hash table entry.
|
||||
*/
|
||||
for (index = hash, i = 0;; index += ++i) {
|
||||
entry = &hsearch->entries[index & hsearch->index_mask];
|
||||
if (entry->key == NULL)
|
||||
break;
|
||||
if (strcmp(entry->key, item.key) == 0) {
|
||||
*retval = entry;
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Only perform the insertion if action is set to ENTER. */
|
||||
if (action == FIND) {
|
||||
errno = ESRCH;
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (hsearch->entries_used * 2 >= hsearch->index_mask) {
|
||||
/* Preserve the old hash table entries. */
|
||||
old_count = hsearch->index_mask + 1;
|
||||
old_entries = hsearch->entries;
|
||||
|
||||
/*
|
||||
* Allocate and install a new table if insertion would
|
||||
* yield a hash table that is more than 50% used. By
|
||||
* using 50% as a threshold, a lookup will only take up
|
||||
* to two steps on average.
|
||||
*/
|
||||
new_count = (hsearch->index_mask + 1) * 2;
|
||||
new_entries = calloc(new_count, sizeof(ENTRY));
|
||||
if (new_entries == NULL)
|
||||
return (0);
|
||||
hsearch->entries = new_entries;
|
||||
hsearch->index_mask = new_count - 1;
|
||||
|
||||
/* Copy over the entries from the old table to the new table. */
|
||||
for (i = 0; i < old_count; ++i) {
|
||||
entry = &old_entries[i];
|
||||
if (entry->key != NULL) {
|
||||
old_hash = hsearch_hash(hsearch->offset_basis,
|
||||
entry->key);
|
||||
*hsearch_lookup_free(hsearch, old_hash) =
|
||||
*entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Destroy the old hash table entries. */
|
||||
free(old_entries);
|
||||
|
||||
/*
|
||||
* Perform a new lookup for a free table entry, so that
|
||||
* we insert the entry into the new hash table.
|
||||
*/
|
||||
hsearch = htab->__hsearch;
|
||||
entry = hsearch_lookup_free(hsearch, hash);
|
||||
}
|
||||
|
||||
/* Insert the new entry into the hash table. */
|
||||
*entry = item;
|
||||
++hsearch->entries_used;
|
||||
*retval = entry;
|
||||
return (1);
|
||||
}
|
86
root-packages/arp-scan/hsearch/search.h
Normal file
86
root-packages/arp-scan/hsearch/search.h
Normal file
@ -0,0 +1,86 @@
|
||||
/*-
|
||||
* Written by J.T. Conklin <jtc@NetBSD.org>
|
||||
* Public domain.
|
||||
*
|
||||
* $NetBSD: search.h,v 1.16 2005/02/03 04:39:32 perry Exp $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _SEARCH_H_
|
||||
#define _SEARCH_H_
|
||||
|
||||
#include <stddef.h>
|
||||
//#include <sys/cdefs.h>
|
||||
//#include <sys/types.h>
|
||||
|
||||
#ifndef _SIZE_T_DECLARED
|
||||
//typedef __size_t size_t;
|
||||
#define _SIZE_T_DECLARED
|
||||
#endif
|
||||
|
||||
typedef struct entry {
|
||||
char *key;
|
||||
void *data;
|
||||
} ENTRY;
|
||||
|
||||
typedef enum {
|
||||
FIND, ENTER
|
||||
} ACTION;
|
||||
|
||||
typedef enum {
|
||||
preorder,
|
||||
postorder,
|
||||
endorder,
|
||||
leaf
|
||||
} VISIT;
|
||||
|
||||
#ifdef _SEARCH_PRIVATE
|
||||
typedef struct __posix_tnode {
|
||||
void *key;
|
||||
struct __posix_tnode *llink, *rlink;
|
||||
signed char balance;
|
||||
} posix_tnode;
|
||||
|
||||
struct que_elem {
|
||||
struct que_elem *next;
|
||||
struct que_elem *prev;
|
||||
};
|
||||
#else
|
||||
typedef void posix_tnode;
|
||||
#endif
|
||||
|
||||
//#if __BSD_VISIBLE
|
||||
struct hsearch_data {
|
||||
struct __hsearch *__hsearch;
|
||||
};
|
||||
//#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
int hcreate(size_t);
|
||||
void hdestroy(void);
|
||||
ENTRY *hsearch(ENTRY, ACTION);
|
||||
void insque(void *, void *);
|
||||
void *lfind(const void *, const void *, size_t *, size_t,
|
||||
int (*)(const void *, const void *));
|
||||
void *lsearch(const void *, void *, size_t *, size_t,
|
||||
int (*)(const void *, const void *));
|
||||
void remque(void *);
|
||||
void *tdelete(const void * __restrict, posix_tnode ** __restrict,
|
||||
int (*)(const void *, const void *));
|
||||
posix_tnode *
|
||||
tfind(const void *, posix_tnode * const *,
|
||||
int (*)(const void *, const void *));
|
||||
posix_tnode *
|
||||
tsearch(const void *, posix_tnode **,
|
||||
int (*)(const void *, const void *));
|
||||
void twalk(const posix_tnode *, void (*)(const posix_tnode *, VISIT, int));
|
||||
|
||||
//#if __BSD_VISIBLE
|
||||
int hcreate_r(size_t, struct hsearch_data *);
|
||||
void hdestroy_r(struct hsearch_data *);
|
||||
int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
|
||||
//#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_SEARCH_H_ */
|
8
root-packages/avrdude/build.sh
Normal file
8
root-packages/avrdude/build.sh
Normal file
@ -0,0 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://savannah.nongnu.org/projects/avrdude
|
||||
TERMUX_PKG_DESCRIPTION="Software for programming Microchip (former Atmel) AVR Microcontrollers"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=6.4
|
||||
TERMUX_PKG_SRCURL=http://download.savannah.gnu.org/releases/avrdude/avrdude-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=a9be7066f70a9dcf4bf0736fcf531db6a3250aed1a24cc643add27641b7110f9
|
||||
TERMUX_PKG_DEPENDS="libusb"
|
29
root-packages/bettercap/build.sh
Normal file
29
root-packages/bettercap/build.sh
Normal file
@ -0,0 +1,29 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.bettercap.org
|
||||
TERMUX_PKG_DESCRIPTION="The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2.32.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/bettercap/bettercap/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=ea28d4d533776a328a54723a74101d1720016ffe7d434bf1d7ab222adb397ac6
|
||||
TERMUX_PKG_DEPENDS="libpcap, libusb, libnetfilter-queue"
|
||||
|
||||
termux_step_configure() {
|
||||
termux_setup_golang
|
||||
export GOPATH=$TERMUX_PKG_BUILDDIR
|
||||
export CGO_CFLAGS="-I$TERMUX_PREFIX/include"
|
||||
|
||||
mkdir -p "$GOPATH"/src/github.com/bettercap/
|
||||
cp -a "$TERMUX_PKG_SRCDIR" "$GOPATH"/src/github.com/bettercap/bettercap
|
||||
go get github.com/bettercap/recording
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
cd src/github.com/bettercap/bettercap
|
||||
make build
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
cd src/github.com/bettercap/bettercap
|
||||
make install
|
||||
}
|
38
root-packages/bettercap/fix-home-path.patch
Normal file
38
root-packages/bettercap/fix-home-path.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/modules/https_proxy/https_proxy.go b/modules/https_proxy/https_proxy.go
|
||||
index 06bc1e0..127bb39 100644
|
||||
--- a/modules/https_proxy/https_proxy.go
|
||||
+++ b/modules/https_proxy/https_proxy.go
|
||||
@@ -47,12 +47,12 @@ func NewHttpsProxy(s *session.Session) *HttpsProxy {
|
||||
"URL, path or javascript code to inject into every HTML page."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("https.proxy.certificate",
|
||||
- "~/.bettercap-ca.cert.pem",
|
||||
+ "@TERMUX_HOME@/.bettercap-ca.cert.pem",
|
||||
"",
|
||||
"HTTPS proxy certification authority TLS certificate file."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("https.proxy.key",
|
||||
- "~/.bettercap-ca.key.pem",
|
||||
+ "@TERMUX_HOME@/.bettercap-ca.key.pem",
|
||||
"",
|
||||
"HTTPS proxy certification authority TLS key file."))
|
||||
|
||||
diff --git a/modules/https_server/https_server.go b/modules/https_server/https_server.go
|
||||
index 0d9ff80..3e49996 100644
|
||||
--- a/modules/https_server/https_server.go
|
||||
+++ b/modules/https_server/https_server.go
|
||||
@@ -42,12 +42,12 @@ func NewHttpsServer(s *session.Session) *HttpsServer {
|
||||
"Port to bind the http server to."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("https.server.certificate",
|
||||
- "~/.bettercap-httpd.cert.pem",
|
||||
+ "@TERMUX_HOME@/.bettercap-httpd.cert.pem",
|
||||
"",
|
||||
"TLS certificate file (will be auto generated if filled but not existing)."))
|
||||
|
||||
mod.AddParam(session.NewStringParameter("https.server.key",
|
||||
- "~/.bettercap-httpd.key.pem",
|
||||
+ "@TERMUX_HOME@/.bettercap-httpd.key.pem",
|
||||
"",
|
||||
"TLS key file (will be auto generated if filled but not existing)."))
|
||||
|
26
root-packages/bettercap/fix-paths.patch
Normal file
26
root-packages/bettercap/fix-paths.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/caplets/env.go b/caplets/env.go
|
||||
index 9ba8706..fd12078 100644
|
||||
--- a/caplets/env.go
|
||||
+++ b/caplets/env.go
|
||||
@@ -19,7 +19,7 @@ func getDefaultInstallBase() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return filepath.Join(os.Getenv("ALLUSERSPROFILE"), "bettercap")
|
||||
}
|
||||
- return "/usr/local/share/bettercap/"
|
||||
+ return "@TERMUX_PREFIX@/share/bettercap/"
|
||||
}
|
||||
|
||||
func getUserHomeDir() string {
|
||||
diff --git a/modules/ui/ui.go b/modules/ui/ui.go
|
||||
index 7bc5270..9a5476a 100644
|
||||
--- a/modules/ui/ui.go
|
||||
+++ b/modules/ui/ui.go
|
||||
@@ -34,7 +34,7 @@ func getDefaultInstallBase() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
return filepath.Join(os.Getenv("ALLUSERSPROFILE"), "bettercap")
|
||||
}
|
||||
- return "/usr/local/share/bettercap/"
|
||||
+ return "@TERMUX_PREFIX@/share/bettercap/"
|
||||
}
|
||||
|
||||
func NewUIModule(s *session.Session) *UIModule {
|
8
root-packages/bindfs/build.sh
Normal file
8
root-packages/bindfs/build.sh
Normal file
@ -0,0 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE="http://bindfs.org/"
|
||||
TERMUX_PKG_DESCRIPTION="A FUSE filesystem for mirroring a directory to another directory."
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_LICENSE_FILE="COPYING"
|
||||
TERMUX_PKG_VERSION="1.15.1"
|
||||
TERMUX_PKG_SRCURL="https://bindfs.org/downloads/bindfs-${TERMUX_PKG_VERSION}.tar.gz"
|
||||
TERMUX_PKG_SHA256="04dd3584a6cdf9af4344d403c62185ca9fab31ce3ae5a25d0101bc10936c68ab"
|
||||
TERMUX_PKG_DEPENDS="libfuse2"
|
12
root-packages/bindfs/getpwent.patch
Normal file
12
root-packages/bindfs/getpwent.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/src/userinfo.c 2021-02-15 04:35:51.000000000 +0100
|
||||
+++ b/src/userinfo.c 2021-12-18 10:33:46.323685173 +0100
|
||||
@@ -100,6 +100,9 @@
|
||||
|
||||
static int rebuild_uid_cache()
|
||||
{
|
||||
+ /* Not supported on Android. */
|
||||
+ return 0;
|
||||
+
|
||||
/* We're holding the lock, so we have mutual exclusion on getpwent and getgrent too. */
|
||||
struct passwd *pw;
|
||||
struct uid_cache_entry *ent;
|
46
root-packages/containerd/Makefile.patch
Normal file
46
root-packages/containerd/Makefile.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff --git a/data/data/com.termux/files/usr/tmp/docker-build/containerd-1.4.3/Makefile b/Makefile
|
||||
index c0fecb9..e724e52 100644
|
||||
--- a/data/data/com.termux/files/usr/tmp/docker-build/containerd-1.4.3/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -20,10 +20,10 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
DESTDIR ?= /usr/local
|
||||
|
||||
# Used to populate variables in version package.
|
||||
-VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
|
||||
-REVISION=$(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi)
|
||||
+VERSION=v1.4.3.m
|
||||
+REVISION=269548fa27e0089a8b8278fc4fc781d7f65a939b.m
|
||||
PACKAGE=github.com/containerd/containerd
|
||||
-SHIM_CGO_ENABLED ?= 0
|
||||
+SHIM_CGO_ENABLED ?= 1
|
||||
|
||||
ifneq "$(strip $(shell command -v go 2>/dev/null))" ""
|
||||
GOOS ?= $(shell go env GOOS)
|
||||
@@ -69,7 +69,7 @@ RELEASE=containerd-$(VERSION:v%=%).${GOOS}-${GOARCH}
|
||||
PKG=github.com/containerd/containerd
|
||||
|
||||
# Project binaries.
|
||||
-COMMANDS=ctr containerd containerd-stress
|
||||
+COMMANDS=ctr containerd containerd-stress containerd-shim containerd-shim-runc-v1 containerd-shim-runc-v2
|
||||
MANPAGES=ctr.8 containerd.8 containerd-config.8 containerd-config.toml.5
|
||||
|
||||
ifdef BUILDTAGS
|
||||
@@ -80,7 +80,7 @@ GO_BUILDTAGS ?= apparmor selinux
|
||||
GO_BUILDTAGS += ${DEBUG_TAGS}
|
||||
GO_TAGS=$(if $(GO_BUILDTAGS),-tags "$(GO_BUILDTAGS)",)
|
||||
GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) $(EXTRA_LDFLAGS)'
|
||||
-SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags "-static" $(EXTRA_LDFLAGS)'
|
||||
+SHIM_GO_LDFLAGS=-ldflags '-X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PACKAGE) -extldflags $(EXTRA_LDFLAGS)'
|
||||
|
||||
# Project packages.
|
||||
PACKAGES=$(shell go list ${GO_TAGS} ./... | grep -v /vendor/)
|
||||
@@ -226,7 +226,8 @@ man/ctr.8: FORCE
|
||||
|
||||
man/%: docs/man/%.md FORCE
|
||||
@echo "$(WHALE) $@"
|
||||
- go-md2man -in "$<" -out "$@"
|
||||
+ go build -o "bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
|
||||
+ bin/go-md2man -in "$<" -out "$@"
|
||||
|
||||
define installmanpage
|
||||
mkdir -p $(DESTDIR)/man/man$(2);
|
36
root-packages/containerd/build.sh
Normal file
36
root-packages/containerd/build.sh
Normal file
@ -0,0 +1,36 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://containerd.io/
|
||||
TERMUX_PKG_DESCRIPTION="An open and reliable container runtime"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.4.13
|
||||
TERMUX_PKG_SRCURL=https://github.com/containerd/containerd/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=7c554e71b34209da5a8a851e16e4edeb375a47f39b099f3bd207bd0500002175
|
||||
TERMUX_PKG_DEPENDS="runc"
|
||||
TERMUX_PKG_CONFFILES="etc/containerd/config.toml"
|
||||
|
||||
termux_step_make() {
|
||||
# setup go build environment
|
||||
termux_setup_golang
|
||||
go env -w GO111MODULE=auto
|
||||
export GOPATH="${PWD}/go"
|
||||
mkdir -p "${GOPATH}/src/github.com/containerd"
|
||||
ln -sf "${TERMUX_PKG_SRCDIR}" "${GOPATH}/src/github.com/containerd/containerd"
|
||||
cd "${GOPATH}/src/github.com/containerd/containerd"
|
||||
|
||||
# apply some patches in a batch
|
||||
xargs sed -i "s_\(/etc/containerd\)_${TERMUX_PREFIX}\1_g" < <(grep -R /etc/containerd | cut -d':' -f1 | sort | uniq)
|
||||
|
||||
# issue the build command
|
||||
export BUILDTAGS=no_btrfs
|
||||
make -j ${TERMUX_MAKE_PROCESSES}
|
||||
(unset GOOS GOARCH CGO_LDFLAGS CC CXX CFLAGS CXXFLAGS LDFLAGS
|
||||
make -j ${TERMUX_MAKE_PROCESSES} man)
|
||||
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
cd "${GOPATH}/src/github.com/containerd/containerd"
|
||||
DESTDIR=${TERMUX_PREFIX} make install
|
||||
DESTDIR=${TERMUX_PREFIX}/share make install-man
|
||||
install -Dm 600 ${TERMUX_PKG_BUILDER_DIR}/config.toml ${TERMUX_PREFIX}/etc/containerd/config.toml
|
||||
}
|
13
root-packages/containerd/bundle.go.patch
Normal file
13
root-packages/containerd/bundle.go.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/data/data/com.termux/files/home/test/containerd-1.4.3/runtime/v1/linux/bundle.go b/runtime/v1/linux/bundle.go
|
||||
index 9d0a6c4..a2063b2 100644
|
||||
--- a/data/data/com.termux/files/home/test/containerd-1.4.3/runtime/v1/linux/bundle.go
|
||||
+++ b/runtime/v1/linux/bundle.go
|
||||
@@ -138,7 +138,7 @@ func (b *bundle) legacyShimAddress(namespace string) string {
|
||||
return filepath.Join(string(filepath.Separator), "containerd-shim", namespace, b.id, "shim.sock")
|
||||
}
|
||||
|
||||
-const socketRoot = "/run/containerd"
|
||||
+const socketRoot = "/data/docker/run/containerd"
|
||||
|
||||
func (b *bundle) shimAddress(namespace, socketPath string) string {
|
||||
d := sha256.Sum256([]byte(filepath.Join(socketPath, namespace, b.id)))
|
9
root-packages/containerd/config.toml
Normal file
9
root-packages/containerd/config.toml
Normal file
@ -0,0 +1,9 @@
|
||||
root = "/data/docker/var/lib/containerd"
|
||||
state = "/data/docker/run/containerd"
|
||||
imports = ["$PREFIX/etc/containerd/runtime_*.toml", "./debug.toml"]
|
||||
|
||||
[grpc]
|
||||
address = "/data/docker/run/containerd/containerd.sock"
|
||||
|
||||
[debug]
|
||||
address = "/data/docker/run/containerd/debug.sock"
|
17
root-packages/containerd/database.go.patch
Normal file
17
root-packages/containerd/database.go.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/data/data/com.termux/files/home/test/containerd-1.4.3/platforms/database.go b/platforms/database.go
|
||||
index 6ede940..d010005 100644
|
||||
--- a/data/data/com.termux/files/home/test/containerd-1.4.3/platforms/database.go
|
||||
+++ b/platforms/database.go
|
||||
@@ -25,7 +25,11 @@ import (
|
||||
//
|
||||
// The OS value should be normalized before calling this function.
|
||||
func isLinuxOS(os string) bool {
|
||||
- return os == "linux"
|
||||
+ switch os {
|
||||
+ case "linux", "android":
|
||||
+ return true
|
||||
+ }
|
||||
+ return false
|
||||
}
|
||||
|
||||
// These function are generated from https://golang.org/src/go/build/syslist.go.
|
57
root-packages/containerd/md2man.go.patch
Normal file
57
root-packages/containerd/md2man.go.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man.go
|
||||
new file mode 100644
|
||||
index 0000000..6078864
|
||||
--- /dev/null
|
||||
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man.go
|
||||
@@ -0,0 +1,51 @@
|
||||
+package main
|
||||
+
|
||||
+import (
|
||||
+ "flag"
|
||||
+ "fmt"
|
||||
+ "io/ioutil"
|
||||
+ "os"
|
||||
+
|
||||
+ "github.com/cpuguy83/go-md2man/v2/md2man"
|
||||
+)
|
||||
+
|
||||
+var inFilePath = flag.String("in", "", "Path to file to be processed (default: stdin)")
|
||||
+var outFilePath = flag.String("out", "", "Path to output processed file (default: stdout)")
|
||||
+
|
||||
+func main() {
|
||||
+ var err error
|
||||
+ flag.Parse()
|
||||
+
|
||||
+ inFile := os.Stdin
|
||||
+ if *inFilePath != "" {
|
||||
+ inFile, err = os.Open(*inFilePath)
|
||||
+ if err != nil {
|
||||
+ fmt.Println(err)
|
||||
+ os.Exit(1)
|
||||
+ }
|
||||
+ }
|
||||
+ defer inFile.Close() // nolint: errcheck
|
||||
+
|
||||
+ doc, err := ioutil.ReadAll(inFile)
|
||||
+ if err != nil {
|
||||
+ fmt.Println(err)
|
||||
+ os.Exit(1)
|
||||
+ }
|
||||
+
|
||||
+ out := md2man.Render(doc)
|
||||
+
|
||||
+ outFile := os.Stdout
|
||||
+ if *outFilePath != "" {
|
||||
+ outFile, err = os.Create(*outFilePath)
|
||||
+ if err != nil {
|
||||
+ fmt.Println(err)
|
||||
+ os.Exit(1)
|
||||
+ }
|
||||
+ defer outFile.Close() // nolint: errcheck
|
||||
+ }
|
||||
+ _, err = outFile.Write(out)
|
||||
+ if err != nil {
|
||||
+ fmt.Println(err)
|
||||
+ os.Exit(1)
|
||||
+ }
|
||||
+}
|
13
root-packages/containerd/util_unix.go.patch
Normal file
13
root-packages/containerd/util_unix.go.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/data/data/com.termux/files/home/test/containerd-1.4.3/runtime/v2/shim/util_unix.go b/runtime/v2/shim/util_unix.go
|
||||
index 2b0d0ad..9adb593 100644
|
||||
--- a/data/data/com.termux/files/home/test/containerd-1.4.3/runtime/v2/shim/util_unix.go
|
||||
+++ b/runtime/v2/shim/util_unix.go
|
||||
@@ -66,7 +66,7 @@ func AdjustOOMScore(pid int) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
-const socketRoot = "/run/containerd"
|
||||
+const socketRoot = "/data/docker/run/containerd"
|
||||
|
||||
// SocketAddress returns a socket address
|
||||
func SocketAddress(ctx context.Context, socketPath, id string) (string, error) {
|
18
root-packages/cryptsetup/build.sh
Normal file
18
root-packages/cryptsetup/build.sh
Normal file
@ -0,0 +1,18 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://gitlab.com/cryptsetup/cryptsetup/
|
||||
TERMUX_PKG_DESCRIPTION="Userspace setup tool for transparent encryption of block devices using dm-crypt"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2.3.6
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SRCURL=https://mirrors.edge.kernel.org/pub/linux/utils/cryptsetup/v${TERMUX_PKG_VERSION:0:3}/cryptsetup-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=b296b7a21ea576c2b180611ccb19d06aec8dddaedf7c704b0c6a81210c25635f
|
||||
TERMUX_PKG_DEPENDS="json-c, libdevmapper, libgcrypt, libpopt, libuuid, util-linux, openssl, libiconv"
|
||||
TERMUX_PKG_BREAKS="cryptsetup-dev"
|
||||
TERMUX_PKG_REPLACES="cryptsetup-dev"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--with-luks2-lock-path=$TERMUX_PREFIX/var/run
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export LDFLAGS+=" -liconv"
|
||||
}
|
21
root-packages/cryptsetup/fix-loopdev-path.patch
Normal file
21
root-packages/cryptsetup/fix-loopdev-path.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -uNr cryptsetup-2.0.3/lib/utils_loop.c cryptsetup-2.0.3.mod/lib/utils_loop.c
|
||||
--- cryptsetup-2.0.3/lib/utils_loop.c 2018-02-28 11:20:59.000000000 +0200
|
||||
+++ cryptsetup-2.0.3.mod/lib/utils_loop.c 2018-05-26 19:02:53.546906033 +0300
|
||||
@@ -57,7 +57,7 @@
|
||||
struct loop_info64 lo64 = {0};
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
- sprintf(dev, "/dev/loop%d", i);
|
||||
+ sprintf(dev, "/dev/block/loop%d", i);
|
||||
|
||||
loop_fd = open(dev, O_RDONLY);
|
||||
if (loop_fd < 0)
|
||||
@@ -91,7 +91,7 @@
|
||||
}
|
||||
close(loop_fd);
|
||||
|
||||
- if (sprintf(dev, "/dev/loop%d", i) < 0)
|
||||
+ if (sprintf(dev, "/dev/block/loop%d", i) < 0)
|
||||
return NULL;
|
||||
|
||||
if (stat(dev, &st) || !S_ISBLK(st.st_mode))
|
25
root-packages/dnsmasq/Makefile.patch
Normal file
25
root-packages/dnsmasq/Makefile.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- ./Makefile.orig 2020-01-11 09:55:44.939872951 +0100
|
||||
+++ ./Makefile 2020-01-11 09:56:29.246687538 +0100
|
||||
@@ -18,17 +18,17 @@
|
||||
|
||||
# Variables you may well want to override.
|
||||
|
||||
-PREFIX = /usr/local
|
||||
-BINDIR = $(PREFIX)/sbin
|
||||
+PREFIX ?= /usr/local
|
||||
+BINDIR = $(PREFIX)/bin
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
LOCALEDIR = $(PREFIX)/share/locale
|
||||
BUILDDIR = $(SRC)
|
||||
DESTDIR =
|
||||
-CFLAGS = -Wall -W -O2
|
||||
-LDFLAGS =
|
||||
+CFLAGS ?= -Wall -W -O2
|
||||
+LDFLAGS ?=
|
||||
COPTS =
|
||||
RPM_OPT_FLAGS =
|
||||
-LIBS =
|
||||
+LIBS = -llog
|
||||
|
||||
#################################################################
|
||||
|
8
root-packages/dnsmasq/build.sh
Normal file
8
root-packages/dnsmasq/build.sh
Normal file
@ -0,0 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.thekelleys.org.uk/dnsmasq/doc.html
|
||||
TERMUX_PKG_DESCRIPTION="Dnsmasq provides network infrastructure for small networks"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2.86
|
||||
TERMUX_PKG_SRCURL=http://www.thekelleys.org.uk/dnsmasq/dnsmasq-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=28d52cfc9e2004ac4f85274f52b32e1647b4dbc9761b82e7de1e41c49907eb08
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
11
root-packages/dnsmasq/dnsmasq.h.patch
Normal file
11
root-packages/dnsmasq/dnsmasq.h.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../dnsmasq.h.orig 2018-05-08 13:06:37.979102506 +0000
|
||||
+++ ./src/dnsmasq.h 2018-05-08 13:07:40.820943857 +0000
|
||||
@@ -111,7 +111,7 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
#include <stdarg.h>
|
||||
-#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__sun__) || defined (__sun) || defined (__ANDROID__)
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__sun__) || defined (__sun)
|
||||
# include <netinet/if_ether.h>
|
||||
#else
|
||||
# include <net/ethernet.h>
|
20
root-packages/docker-compose/build.sh
Normal file
20
root-packages/docker-compose/build.sh
Normal file
@ -0,0 +1,20 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/docker/compose
|
||||
TERMUX_PKG_DESCRIPTION="Compose is a tool for defining and running multi-container Docker applications."
|
||||
TERMUX_PKG_SHA256=10657bbca710b7bfe7e17f259a4ab6cf69b890e7ac4b3bfc2444ef3086bd89cb
|
||||
TERMUX_PKG_VERSION="2.3.4"
|
||||
TERMUX_PKG_SRCURL="https://github.com/docker/compose/archive/v${TERMUX_PKG_VERSION}.tar.gz"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_DEPENDS=docker
|
||||
|
||||
termux_step_make() {
|
||||
termux_setup_golang
|
||||
export GOPATH=$TERMUX_PKG_BUILDDIR
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
mkdir bin/
|
||||
if ! [ -z "$GOOS" ];then export GOOS=android;fi
|
||||
go build -o bin/docker-compose -ldflags="-s -w -X github.com/docker/compose/v2/internal.Version=${TERMUX_PKG_VERSION}" ./cmd
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm755 -t "${TERMUX_PREFIX}"/bin "${TERMUX_PKG_SRCDIR}"/bin/docker-compose
|
||||
}
|
144
root-packages/docker/build.sh
Normal file
144
root-packages/docker/build.sh
Normal file
@ -0,0 +1,144 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://docker.com
|
||||
TERMUX_PKG_DESCRIPTION="Set of products that use OS-level virtualization to deliver software in packages called containers."
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=20.10.12
|
||||
LIBNETWORK_COMMIT=64b7a4574d1426139437d20e81c0b6d391130ec8
|
||||
DOCKER_GITCOMMIT=459d0dfbbb
|
||||
TERMUX_PKG_SRCURL=(https://github.com/moby/moby/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
https://github.com/docker/cli/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
https://github.com/moby/libnetwork/archive/${LIBNETWORK_COMMIT}.tar.gz)
|
||||
TERMUX_PKG_SHA256=(a8ee80d31c7b74f687a837cd2a8570578f118179fba0844c5ee88f90fe180155
|
||||
d86e3e6e10669634ee02b5e071e5ee504457a9d03941bbc5b7f2bd3683ebdb19
|
||||
ede21e645ff6552b3a508f6186d3f34d267015ec0f96eefecf6d08c03cbd2987)
|
||||
TERMUX_PKG_DEPENDS="containerd, libdevmapper"
|
||||
TERMUX_PKG_CONFFILES="etc/docker/daemon.json"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
||||
|
||||
termux_step_get_source() {
|
||||
local PKG_SRCURL=(${TERMUX_PKG_SRCURL[@]})
|
||||
local PKG_SHA256=(${TERMUX_PKG_SHA256[@]})
|
||||
|
||||
if [ ${#PKG_SRCURL[@]} != ${#PKG_SHA256[@]} ]; then
|
||||
termux_error_exit "Error: length of TERMUX_PKG_SRCURL isn't equal to length of TERMUX_PKG_SHA256."
|
||||
fi
|
||||
|
||||
# download and extract packages into its own folder inside $TERMUX_PKG_SRCDIR
|
||||
mkdir -p "$TERMUX_PKG_CACHEDIR"
|
||||
mkdir -p "$TERMUX_PKG_SRCDIR"
|
||||
for i in $(seq 0 $(( ${#PKG_SRCURL[@]} - 1 ))); do
|
||||
local file="${TERMUX_PKG_CACHEDIR}/$(basename ${PKG_SRCURL[$i]})"
|
||||
rm -rf "$file"
|
||||
termux_download "${PKG_SRCURL[$i]}" "$file" "${PKG_SHA256[$i]}"
|
||||
tar xf "$file" -C "$TERMUX_PKG_SRCDIR"
|
||||
done
|
||||
|
||||
# delete trailing -$TERMUX_PKG_VERSION from folder name
|
||||
# so patches become portable across different versions
|
||||
cd "$TERMUX_PKG_SRCDIR"
|
||||
for folder in $(ls); do
|
||||
if [ ! $folder == ${folder%%-*} ]; then
|
||||
mv $folder ${folder%%-*}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
# setup go build environment
|
||||
termux_setup_golang
|
||||
export GO111MODULE=auto
|
||||
|
||||
# BUILD DOCKERD DAEMON
|
||||
echo -n "Building dockerd daemon..."
|
||||
(
|
||||
set -e
|
||||
cd moby
|
||||
|
||||
# apply some patches in a batch
|
||||
xargs sed -i "s_\(/etc/docker\)_${TERMUX_PREFIX}\1_g" < <(grep -R /etc/docker | cut -d':' -f1 | sort | uniq)
|
||||
xargs sed -i 's_\(/run/docker/plugins\)_/data/docker\1_g' < <(grep -R '/run/docker/plugins' | cut -d':' -f1 | sort | uniq)
|
||||
xargs sed -i 's/[a-zA-Z0-9]*\.GOOS/"linux"/g' < <(grep -R '[a-zA-Z0-9]*\.GOOS' | cut -d':' -f1 | sort | uniq)
|
||||
|
||||
# issue the build command
|
||||
export DOCKER_GITCOMMIT
|
||||
export DOCKER_BUILDTAGS='exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_quota selinux exclude_graphdriver_aufs'
|
||||
# horrible, but effective way to apply patches on the fly while compiling
|
||||
while ! IFS='' files=$(AUTO_GOPATH=1 PREFIX='' hack/make.sh dynbinary 2>&1 1>/dev/null); do
|
||||
if ! xargs sed -i 's/\("runtime"\)/_ \1/' < <(echo $files | grep runtime | cut -d':' -f1 | cut -c38-); then
|
||||
echo $files;
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
)
|
||||
echo " Done!"
|
||||
|
||||
# BUILD DOCKER-PROXY BINARY FROM LIBNETWORK
|
||||
echo -n "Building docker-proxy from libnetwork..."
|
||||
(
|
||||
set -e
|
||||
|
||||
# fix path locations to build with go
|
||||
mkdir -p go/src/github.com/docker
|
||||
mv libnetwork go/src/github.com/docker
|
||||
mkdir libnetwork
|
||||
mv go libnetwork
|
||||
export GOPATH="${PWD}/libnetwork/go"
|
||||
cd "${GOPATH}/src/github.com/docker/libnetwork"
|
||||
|
||||
# issue the build command
|
||||
go build -o docker-proxy github.com/docker/libnetwork/cmd/proxy
|
||||
)
|
||||
echo " Done!"
|
||||
|
||||
# BUILD DOCKER-CLI CLIENT
|
||||
echo -n "Building docker-cli client..."
|
||||
(
|
||||
set -e
|
||||
|
||||
# fix path locations to build with go
|
||||
mkdir -p go/src/github.com/docker
|
||||
mv cli go/src/github.com/docker
|
||||
mkdir cli
|
||||
mv go cli
|
||||
export GOPATH="${PWD}/cli/go"
|
||||
cd "${GOPATH}/src/github.com/docker/cli"
|
||||
|
||||
# apply some patches in a batch
|
||||
xargs sed -i 's_/var/\(run/docker\.sock\)_/data/docker/\1_g' < <(grep -R /var/run/docker\.sock | cut -d':' -f1 | sort | uniq)
|
||||
|
||||
# issue the build command
|
||||
export VERSION=v${TERMUX_PKG_VERSION}-ce
|
||||
export DISABLE_WARN_OUTSIDE_CONTAINER=1
|
||||
export LDFLAGS="-L ${TERMUX_PREFIX}/lib -r ${TERMUX_PREFIX}/lib"
|
||||
make -j ${TERMUX_MAKE_PROCESSES} dynbinary
|
||||
unset GOOS GOARCH CGO_LDFLAGS CC CXX CFLAGS CXXFLAGS LDFLAGS
|
||||
make -j ${TERMUX_MAKE_PROCESSES} manpages
|
||||
)
|
||||
echo " Done!"
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm 700 moby/bundles/dynbinary-daemon/dockerd ${TERMUX_PREFIX}/libexec/dockerd
|
||||
install -Dm 700 libnetwork/go/src/github.com/docker/libnetwork/docker-proxy ${TERMUX_PREFIX}/bin/docker-proxy
|
||||
install -Dm 700 cli/go/src/github.com/docker/cli/build/docker-android-* ${TERMUX_PREFIX}/bin/docker
|
||||
install -Dm 600 -t ${TERMUX_PREFIX}/share/man/man1 cli/go/src/github.com/docker/cli/man/man1/*
|
||||
install -Dm 600 -t ${TERMUX_PREFIX}/share/man/man5 cli/go/src/github.com/docker/cli/man/man5/*
|
||||
install -Dm 600 -t ${TERMUX_PREFIX}/share/man/man8 cli/go/src/github.com/docker/cli/man/man8/*
|
||||
install -Dm 600 ${TERMUX_PKG_BUILDER_DIR}/daemon.json ${TERMUX_PREFIX}/etc/docker/daemon.json
|
||||
sed -e "s|@TERMUX_PREFIX@|$TERMUX_PREFIX|g" \
|
||||
"${TERMUX_PKG_BUILDER_DIR}/dockerd.sh" > "${TERMUX_PREFIX}/bin/dockerd"
|
||||
chmod 700 "${TERMUX_PREFIX}/bin/dockerd"
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
cat <<- EOF > postinst
|
||||
#!${TERMUX_PREFIX}/bin/sh
|
||||
|
||||
echo 'NOTE: Docker requires the kernel to support'
|
||||
echo 'device cgroups, namespace, VETH, among others.'
|
||||
echo
|
||||
echo 'To check a full list of features needed, run the script:'
|
||||
echo 'https://github.com/moby/moby/blob/master/contrib/check-config.sh'
|
||||
EOF
|
||||
}
|
40
root-packages/docker/config.go.patch
Normal file
40
root-packages/docker/config.go.patch
Normal file
@ -0,0 +1,40 @@
|
||||
--- ./cli/cli/config/config.go.orig 2021-11-18 00:49:46.000000000 +0100
|
||||
+++ ./cli/cli/config/config.go 2021-12-05 15:25:14.622966748 +0100
|
||||
@@ -11,7 +11,6 @@
|
||||
"github.com/docker/cli/cli/config/configfile"
|
||||
"github.com/docker/cli/cli/config/credentials"
|
||||
"github.com/docker/cli/cli/config/types"
|
||||
- "github.com/docker/docker/pkg/homedir"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
func getHomeDir() string {
|
||||
if homeDir == "" {
|
||||
- homeDir = homedir.Get()
|
||||
+ homeDir = "@TERMUX_HOME@/.docker"
|
||||
}
|
||||
return homeDir
|
||||
}
|
||||
@@ -53,10 +52,7 @@
|
||||
if configDir != "" {
|
||||
return
|
||||
}
|
||||
- configDir = os.Getenv("DOCKER_CONFIG")
|
||||
- if configDir == "" {
|
||||
- configDir = filepath.Join(getHomeDir(), configFileDir)
|
||||
- }
|
||||
+ configDir = "@TERMUX_HOME@/.docker"
|
||||
}
|
||||
|
||||
// Dir returns the directory the configuration file is stored in
|
||||
@@ -131,7 +131,7 @@
|
||||
}
|
||||
|
||||
// Can't find latest config file so check for the old one
|
||||
- filename = filepath.Join(getHomeDir(), oldConfigfile)
|
||||
+ filename = filepath.Join("@TERMUX_HOME@/.docker", oldConfigfile)
|
||||
if file, err := os.Open(filename); err == nil {
|
||||
printLegacyFileWarning = true
|
||||
defer file.Close()
|
15
root-packages/docker/daemon.go.patch
Normal file
15
root-packages/docker/daemon.go.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/moby-20.10.1/cmd/dockerd/daemon.go b/moby/cmd/dockerd/daemon.go
|
||||
index 7fe8a6c..684f297 100644
|
||||
--- a/moby-20.10.1/cmd/dockerd/daemon.go
|
||||
+++ b/moby/cmd/dockerd/daemon.go
|
||||
@@ -554,6 +554,11 @@ func (cli *DaemonCli) getContainerdDaemonOpts() ([]supervisor.DaemonOpt, error)
|
||||
opts = append(opts, supervisor.WithPlugin("cri", nil))
|
||||
}
|
||||
|
||||
+ type Config struct {Path string `toml:"path"`}
|
||||
+ opts = append(opts, supervisor.WithPlugin("opt", &Config{
|
||||
+ Path: "/data/docker/opt",
|
||||
+ }))
|
||||
+
|
||||
return opts, nil
|
||||
}
|
9
root-packages/docker/daemon.json
Normal file
9
root-packages/docker/daemon.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"data-root": "/data/docker/lib/docker",
|
||||
"exec-root": "/data/docker/run/docker",
|
||||
"pidfile": "/data/docker/run/docker.pid",
|
||||
"hosts": [
|
||||
"unix:///data/docker/run/docker.sock"
|
||||
],
|
||||
"storage-driver": "overlay2"
|
||||
}
|
17
root-packages/docker/database.go.patch
Normal file
17
root-packages/docker/database.go.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/cli-20.10.1/vendor/github.com/containerd/containerd/platforms/database.go b/cli/vendor/github.com/containerd/containerd/platforms/database.go
|
||||
index 6ede940..d010005 100644
|
||||
--- a/cli-20.10.1/vendor/github.com/containerd/containerd/platforms/database.go
|
||||
+++ b/cli/vendor/github.com/containerd/containerd/platforms/database.go
|
||||
@@ -25,7 +25,11 @@ import (
|
||||
//
|
||||
// The OS value should be normalized before calling this function.
|
||||
func isLinuxOS(os string) bool {
|
||||
- return os == "linux"
|
||||
+ switch os {
|
||||
+ case "linux", "android":
|
||||
+ return true
|
||||
+ }
|
||||
+ return false
|
||||
}
|
||||
|
||||
// These function are generated from https://golang.org/src/go/build/syslist.go.
|
29
root-packages/docker/dockerd.sh
Executable file
29
root-packages/docker/dockerd.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!@TERMUX_PREFIX@/bin/bash
|
||||
|
||||
export PATH="${PATH}:/system/xbin:/system/bin"
|
||||
opts='rw,nosuid,nodev,noexec,relatime'
|
||||
cgroups='blkio cpu cpuacct cpuset devices freezer memory pids schedtune'
|
||||
|
||||
# try to mount cgroup root dir and exit in case of failure
|
||||
if ! mountpoint -q /sys/fs/cgroup 2>/dev/null; then
|
||||
mkdir -p /sys/fs/cgroup
|
||||
mount -t tmpfs -o "${opts}" cgroup_root /sys/fs/cgroup || exit 1
|
||||
fi
|
||||
|
||||
# try to mount cgroup2
|
||||
if ! mountpoint -q /sys/fs/cgroup/cg2_bpf 2>/dev/null; then
|
||||
mkdir -p /sys/fs/cgroup/cg2_bpf
|
||||
mount -t cgroup2 -o "${opts}" cgroup2_root /sys/fs/cgroup/cg2_bpf
|
||||
fi
|
||||
|
||||
# try to mount differents cgroups
|
||||
for cg in ${cgroups}; do
|
||||
if ! mountpoint -q "/sys/fs/cgroup/${cg}" 2>/dev/null; then
|
||||
mkdir -p "/sys/fs/cgroup/${cg}"
|
||||
mount -t cgroup -o "${opts},${cg}" "${cg}" "/sys/fs/cgroup/${cg}" \
|
||||
|| rmdir "/sys/fs/cgroup/${cg}"
|
||||
fi
|
||||
done
|
||||
|
||||
# start the docker daemon
|
||||
"@TERMUX_PREFIX@/libexec/dockerd" $@
|
18
root-packages/docker/generate-man.sh.patch
Normal file
18
root-packages/docker/generate-man.sh.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- ./cli/scripts/docs/generate-man.sh.orig 2021-12-05 15:26:07.599604265 +0100
|
||||
+++ ./cli/scripts/docs/generate-man.sh 2021-12-05 15:28:20.809486509 +0100
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
if ! command -v go-md2man &> /dev/null; then
|
||||
# yay, go install creates a binary named "v2" ¯\_(ツ)_/¯
|
||||
- go build -o "/go/bin/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
|
||||
+ go build -o "build/go-md2man" ./vendor/github.com/cpuguy83/go-md2man/v2
|
||||
fi
|
||||
|
||||
# Generate man pages from cobra commands
|
||||
-go build -o /tmp/gen-manpages github.com/docker/cli/man
|
||||
-/tmp/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
|
||||
+go build -o build/gen-manpages github.com/docker/cli/man
|
||||
+build/gen-manpages --root "$(pwd)" --target "$(pwd)/man/man1"
|
||||
|
||||
# Generate legacy pages from markdown
|
||||
./man/md2man-all.sh -q
|
9
root-packages/docker/md2man-all.sh.patch
Normal file
9
root-packages/docker/md2man-all.sh.patch
Normal file
@ -0,0 +1,9 @@
|
||||
--- ./cli/man/md2man-all.sh.orig 2021-12-05 15:29:36.176056012 +0100
|
||||
+++ ./cli/man/md2man-all.sh 2021-12-05 15:33:54.339101972 +0100
|
||||
@@ -18,5 +18,5 @@
|
||||
continue
|
||||
fi
|
||||
mkdir -p "./man${num}"
|
||||
- go-md2man -in "$FILE" -out "./man${num}/${name}"
|
||||
+ ../build/go-md2man -in "$FILE" -out "./man${num}/${name}"
|
||||
done
|
10
root-packages/encfs/build.sh
Normal file
10
root-packages/encfs/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://vgough.github.io/encfs/
|
||||
TERMUX_PKG_DESCRIPTION="An encrypted filesystem for FUSE"
|
||||
TERMUX_PKG_LICENSE="LGPL-3.0, GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
_COMMIT=c444f9b9176beea1ad41a7b2e29ca26e709b57f7
|
||||
TERMUX_PKG_VERSION=2020.05.09-${_COMMIT:0:8}
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/vgough/encfs/archive/${_COMMIT}.tar.gz
|
||||
TERMUX_PKG_SHA256=4b4d6b7465114ae74e2c9c6faea0411ea59bcea0f11193db72459e8bb73c16c7
|
||||
TERMUX_PKG_DEPENDS="libfuse2, openssl"
|
8
root-packages/ethtool/build.sh
Normal file
8
root-packages/ethtool/build.sh
Normal file
@ -0,0 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://mirrors.edge.kernel.org/pub/software/network/ethtool/
|
||||
TERMUX_PKG_DESCRIPTION="standard Linux utility for controlling network drivers and hardware, particularly for wired Ethernet devices"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=5.16
|
||||
TERMUX_PKG_SRCURL=https://mirrors.edge.kernel.org/pub/software/network/ethtool/ethtool-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=aa2fef1936dd4a11755dfa0bdb93f0ec5bea45208d27c9754bc3abe1aa42c1cb
|
||||
TERMUX_PKG_DEPENDS="libmnl"
|
11
root-packages/ettercap/CMakeLists.txt.patch
Normal file
11
root-packages/ettercap/CMakeLists.txt.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../CMakeLists.txt.orig 2019-08-27 20:30:33.670343601 +0200
|
||||
+++ ./CMakeLists.txt 2019-08-27 20:29:32.497096038 +0200
|
||||
@@ -107,7 +107,7 @@
|
||||
include(EttercapVariableCheck)
|
||||
|
||||
set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix")
|
||||
-set(INSTALL_SYSCONFDIR /etc CACHE PATH "System configuration directory")
|
||||
+set(INSTALL_SYSCONFDIR @TERMUX_PREFIX@/etc CACHE PATH "System configuration directory")
|
||||
set(INSTALL_LIBDIR ${INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH "Library installation directory")
|
||||
set(INSTALL_DATADIR ${INSTALL_PREFIX}/share CACHE PATH "Data installation directory")
|
||||
set(INSTALL_EXECPREFIX ${INSTALL_PREFIX} CACHE PATH "")
|
15
root-packages/ettercap/EttercapLibCheck.cmake.patch
Normal file
15
root-packages/ettercap/EttercapLibCheck.cmake.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- ../EttercapLibCheck.cmake.orig 2019-08-27 19:47:07.065638380 +0200
|
||||
+++ ./cmake/Modules/EttercapLibCheck.cmake 2019-08-27 19:48:04.867210840 +0200
|
||||
@@ -261,10 +261,8 @@
|
||||
set(EC_LIBS ${EC_LIBS} ${HAVE_RESOLV})
|
||||
set(HAVE_DN_EXPAND 1 CACHE PATH "Found dn_expand")
|
||||
else()
|
||||
- if(OS_BSD)
|
||||
- # FreeBSD has dn_expand built in libc
|
||||
- check_function_exists(dn_expand HAVE_DN_EXPAND)
|
||||
- endif()
|
||||
+ # FreeBSD and Android has dn_expand built in libc
|
||||
+ check_function_exists(dn_expand HAVE_DN_EXPAND)
|
||||
endif()
|
||||
|
||||
find_package(PCRE)
|
10
root-packages/ettercap/EttercapOSTest.cmake.patch
Normal file
10
root-packages/ettercap/EttercapOSTest.cmake.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- ../EttercapOSTest.cmake.orig 2019-08-27 19:01:04.600920329 +0200
|
||||
+++ ./cmake/Modules/EttercapOSTest.cmake 2019-08-27 19:57:48.826678789 +0200
|
||||
@@ -1,5 +1,7 @@
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(OS_LINUX 1)
|
||||
+elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
|
||||
+ set(OS_LINUX 1)
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(OS_BSD 1)
|
||||
set(OS_BSD_FREE 1)
|
14
root-packages/ettercap/build.sh
Normal file
14
root-packages/ettercap/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.ettercap-project.org
|
||||
TERMUX_PKG_DESCRIPTION="Comprehensive suite for MITM attacks, can sniff live connections, do content filtering on the fly and much more"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.8.3.1
|
||||
TERMUX_PKG_REVISION=6
|
||||
TERMUX_PKG_SRCURL=https://github.com/Ettercap/ettercap/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=d0c3ef88dfc284b61d3d5b64d946c1160fd04276b448519c1ae4438a9cdffaf3
|
||||
TERMUX_PKG_DEPENDS="libpcap, openssl, zlib, curl, pcre, ncurses, libiconv, libnet, libltdl, ethtool"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DENABLE_GTK=off
|
||||
-DENABLE_GEOIP=off
|
||||
"
|
34
root-packages/ettercap/ec_threads.c.patch
Normal file
34
root-packages/ettercap/ec_threads.c.patch
Normal file
@ -0,0 +1,34 @@
|
||||
--- ../ec_threads.c.orig 2019-08-27 20:09:25.304142288 +0200
|
||||
+++ ./src/ec_threads.c 2019-08-27 20:14:11.753262944 +0200
|
||||
@@ -233,13 +233,6 @@
|
||||
DEBUG_MSG("ec_thread_init -- %lu", PTHREAD_ID(id));
|
||||
|
||||
INIT_LOCK;
|
||||
-
|
||||
- /*
|
||||
- * allow a thread to be cancelled as soon as the
|
||||
- * cancellation request is received
|
||||
- */
|
||||
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
/* sync with the creator */
|
||||
if ((e = pthread_cond_signal(&init_cond)))
|
||||
@@ -263,7 +256,7 @@
|
||||
|
||||
|
||||
/* send the cancel signal to the thread */
|
||||
- pthread_cancel((pthread_t)id);
|
||||
+ pthread_kill((pthread_t)id, 0);
|
||||
|
||||
|
||||
DEBUG_MSG("ec_thread_destroy -- [%s] terminated", ec_thread_getname(id));
|
||||
@@ -319,7 +312,7 @@
|
||||
DEBUG_MSG("ec_thread_kill_all -- terminating %lu [%s]", PTHREAD_ID(current->t.id), current->t.name);
|
||||
|
||||
/* send the cancel signal to the thread */
|
||||
- pthread_cancel((pthread_t)current->t.id);
|
||||
+ pthread_kill((pthread_t)current->t.id, 0);
|
||||
|
||||
#ifndef BROKEN_PTHREAD_JOIN
|
||||
if (!current->t.detached) {
|
11
root-packages/ettercap/ec_threads.h.patch
Normal file
11
root-packages/ettercap/ec_threads.h.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../ec_threads.h.orig 2019-08-27 20:14:48.025423828 +0200
|
||||
+++ ./include/ec_threads.h 2019-08-27 20:18:58.102432737 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#define RETURN_IF_NOT_MAIN() do{ if (strcmp(ec_thread_getname(EC_PTHREAD_SELF), EC_GBL_PROGRAM)) return; }while(0)
|
||||
|
||||
-#define CANCELLATION_POINT() pthread_testcancel()
|
||||
+#define CANCELLATION_POINT()
|
||||
|
||||
#if defined(OS_DARWIN) || defined(OS_WINDOWS) || defined(OS_CYGWIN)
|
||||
/* XXX - darwin and windows are broken, pthread_join hangs up forever */
|
21
root-packages/ettercap/ec_ui.c.patch
Normal file
21
root-packages/ettercap/ec_ui.c.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- ../ec_ui.c.orig 2019-08-27 20:07:21.158532026 +0200
|
||||
+++ ./src/ec_ui.c 2019-08-27 20:07:36.117841510 +0200
|
||||
@@ -256,9 +256,6 @@
|
||||
if (STAILQ_EMPTY(&messages_queue))
|
||||
return 0;
|
||||
|
||||
- // don't allow the thread to cancel while holding the ui mutex
|
||||
- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &old);
|
||||
-
|
||||
/* the queue is updated by other threads */
|
||||
UI_MSG_LOCK;
|
||||
|
||||
@@ -280,8 +277,6 @@
|
||||
|
||||
UI_MSG_UNLOCK;
|
||||
|
||||
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old);
|
||||
-
|
||||
/* returns the number of displayed messages */
|
||||
return i;
|
||||
|
138
root-packages/frida-server/Makefile.linux.mk.patch
Normal file
138
root-packages/frida-server/Makefile.linux.mk.patch
Normal file
@ -0,0 +1,138 @@
|
||||
--- ./Makefile.linux.mk.orig 2020-12-05 10:51:28.873352898 +0100
|
||||
+++ ./Makefile.linux.mk 2020-12-05 10:58:48.332580362 +0100
|
||||
@@ -301,6 +309,10 @@
|
||||
python-linux-x86_64-thin: build/tmp_thin-linux-x86_64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/x86-64 without cross-arch support
|
||||
python-linux-armhf: build/tmp_thin-linux-armhf/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/armhf
|
||||
python-linux-arm64: build/tmp_thin-linux-arm64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Linux/arm64
|
||||
+python-android-x86: build/tmp-android-x86/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/x86
|
||||
+python-android-x86_64: build/tmp-android-x86_64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/x86_64
|
||||
+python-android-arm: build/tmp-android-arm/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/ARM
|
||||
+python-android-arm64: build/tmp-android-arm64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Build Python bindings for Android/ARM64
|
||||
|
||||
define make-python-rule
|
||||
build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp: build/.frida-python-submodule-stamp build/$1-%/lib/pkgconfig/frida-core-1.0.pc
|
||||
@@ -346,6 +358,22 @@
|
||||
export PYTHONPATH="$(shell pwd)/build/frida_thin-linux-arm64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
&& cd frida-python \
|
||||
&& ${PYTHON} -m unittest discover
|
||||
+check-python-android-x86: build/tmp_thin-android-x86/frida-$(PYTHON_NAME)/.frida-stamp ##@python Test Python bindings for Android/x86
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-x86/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-python \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+check-python-android-x86_64: build/tmp_thin-android-x86_64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Test Python bindings for Android/x86_64
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-x86_64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-python \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+check-python-android-arm: build/tmp_thin-android-arm/frida-$(PYTHON_NAME)/.frida-stamp ##@python Test Python bindings for Android/ARM
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-arm/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-python \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+check-python-android-arm64: build/tmp_thin-android-arm64/frida-$(PYTHON_NAME)/.frida-stamp ##@python Test Python bindings for Android/ARM64
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-arm64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-python \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
|
||||
|
||||
node-linux-x86: build/frida-linux-x86/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/x86
|
||||
@@ -354,6 +382,10 @@
|
||||
node-linux-x86_64-thin: build/frida_thin-linux-x86_64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/x86-64 without cross-arch support
|
||||
node-linux-armhf: build/frida_thin-linux-armhf/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/armhf
|
||||
node-linux-arm64: build/frida_thin-linux-arm64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Linux/arm64
|
||||
+node-android-x86: build/frida_thin-android-x86/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/x86
|
||||
+node-android-x86_64: build/frida_thin-android-x86_64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/x86_64
|
||||
+node-android-arm: build/frida_thin-android-arm/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/ARM
|
||||
+node-android-arm64: build/frida_thin-android-arm64/lib/node_modules/frida build/.frida-node-submodule-stamp ##@node Build Node.js bindings for Android/ARM64
|
||||
|
||||
define make-node-rule
|
||||
build/$1-%/lib/node_modules/frida: build/$1-%/lib/pkgconfig/frida-core-1.0.pc build/.frida-node-submodule-stamp
|
||||
@@ -400,6 +432,14 @@
|
||||
$(call run-node-tests,frida_thin-linux-armhf,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
check-node-linux-arm64: node-linux-arm64 ##@node Test Node.js bindings for Linux/arm64
|
||||
$(call run-node-tests,frida_thin-linux-arm64,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
+check-node-android-x86: node-android-x86 ##@node Test Node.js bindings for Android/x86
|
||||
+ $(call run-node-tests,frida_thin-android-x86,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
+check-node-android-x86_64: node-android-x86_64 ##@node Test Node.js bindings for Android/x86_64
|
||||
+ $(call run-node-tests,frida_thin-android-x86_64,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
+check-node-android-arm: node-android-arm ##@node Test Node.js bindings for Android/ARM
|
||||
+ $(call run-node-tests,frida_thin-android-arm,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
+check-node-android-arm64: node-android-arm64 ##@node Test Node.js bindings for Android/ARM64
|
||||
+ $(call run-node-tests,frida_thin-android-arm64,$(FRIDA),$(NODE_BIN_DIR),$(NODE),$(NPM))
|
||||
|
||||
|
||||
tools-linux-x86: build/tmp-linux-x86/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/x86
|
||||
@@ -408,6 +448,10 @@
|
||||
tools-linux-x86_64-thin: build/tmp_thin-linux-x86_64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/x86-64 without cross-arch support
|
||||
tools-linux-armhf: build/tmp_thin-linux-armhf/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/armhf
|
||||
tools-linux-arm64: build/tmp_thin-linux-arm64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Linux/arm64
|
||||
+tools-android-x86: build/tmp-android-x86/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/x86
|
||||
+tools-android-x86_64: build/tmp-android-x86_64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/x86_64
|
||||
+tools-android-arm: build/tmp-android-arm/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/ARM
|
||||
+tools-android-arm64: build/tmp-android-arm64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Build CLI tools for Android/ARM64
|
||||
|
||||
define make-tools-rule
|
||||
build/$2-%/frida-tools-$$(PYTHON_NAME)/.frida-stamp: build/.frida-tools-submodule-stamp build/$2-%/frida-$$(PYTHON_NAME)/.frida-stamp
|
||||
@@ -451,6 +495,23 @@
|
||||
export PYTHONPATH="$(shell pwd)/build/frida_thin-linux-arm64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
&& cd frida-tools \
|
||||
&& ${PYTHON} -m unittest discover
|
||||
+check-tools-android-x86: build/tmp_thin-android-x86/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Test CLI tools for Android/x86
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-x86/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-tools \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+check-tools-android-x86_64: build/tmp_thin-android-x86_64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Test CLI tools for Android/x86_64
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-x86_64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-tools \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+check-tools-android-arm: build/tmp_thin-android-arm/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Test CLI tools for Android/ARM
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-arm/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-tools \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+check-tools-android-arm64: build/tmp_thin-android-arm64/frida-tools-$(PYTHON_NAME)/.frida-stamp ##@tools Test CLI tools for Android/ARM64
|
||||
+ export PYTHONPATH="$(shell pwd)/build/frida_thin-android-arm64/lib/$(PYTHON_NAME)/site-packages" \
|
||||
+ && cd frida-tools \
|
||||
+ && ${PYTHON} -m unittest discover
|
||||
+
|
||||
|
||||
|
||||
.PHONY: \
|
||||
@@ -479,26 +540,40 @@
|
||||
check-core-linux-x86 check-core-linux-x86_64 \
|
||||
check-core-linux-x86-thin check-core-linux-x86_64-thin \
|
||||
check-core-linux-armhf check-core-linux-arm64 \
|
||||
+ check-core-android-x86 check-core-android-x86_64 \
|
||||
+ check-core-android-arm check-core-android-arm64 \
|
||||
frida-core-update-submodule-stamp \
|
||||
python-linux-x86 python-linux-x86_64 \
|
||||
python-linux-x86-thin python-linux-x86_64-thin \
|
||||
python-linux-armhf python-linux-arm64 \
|
||||
+ python-android-x86 python-android-x86_64 \
|
||||
+ python-android-arm python-android-arm64 \
|
||||
check-python-linux-x86 check-python-linux-x86_64 \
|
||||
check-python-linux-x86-thin check-python-linux-x86_64-thin \
|
||||
check-python-linux-armhf check-python-linux-arm64 \
|
||||
+ check-python-android-x86 check-python-android-x86_64 \
|
||||
+ check-python-android-arm check-python-android-arm64 \
|
||||
frida-python-update-submodule-stamp \
|
||||
node-linux-x86 node-linux-x86_64 \
|
||||
node-linux-x86-thin node-linux-x86_64-thin \
|
||||
node-linux-armhf node-linux-arm64 \
|
||||
+ node-android-x86 node-android-x86_64 \
|
||||
+ node-android-arm node-android-arm64 \
|
||||
check-node-linux-x86 check-node-linux-x86_64 \
|
||||
check-node-linux-x86-thin check-node-linux-x86_64-thin \
|
||||
check-node-linux-armhf check-node-linux-arm64 \
|
||||
+ check-node-android-x86 check-node-android-x86_64 \
|
||||
+ check-node-android-arm check-node-android-arm64 \
|
||||
frida-node-update-submodule-stamp \
|
||||
tools-linux-x86 tools-linux-x86_64 \
|
||||
tools-linux-x86-thin tools-linux-x86_64-thin \
|
||||
tools-linux-armhf tools-linux-arm64 \
|
||||
+ tools-android-x86 tools-android-x86_64 \
|
||||
+ tools-android-arm tools-android-arm64 \
|
||||
check-tools-linux-x86 check-tools-linux-x86_64 \
|
||||
check-tools-linux-x86-thin check-tools-linux-x86_64-thin \
|
||||
check-tools-linux-armhf check-tools-linux-arm64 \
|
||||
+ check-tools-android-x86 check-tools-android-x86_64 \
|
||||
+ check-tools-android-arm check-tools-android-arm64 \
|
||||
frida-tools-update-submodule-stamp
|
||||
.SECONDARY:
|
93
root-packages/frida-server/build.sh
Normal file
93
root-packages/frida-server/build.sh
Normal file
@ -0,0 +1,93 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.frida.re/
|
||||
TERMUX_PKG_DESCRIPTION="Dynamic instrumentation toolkit for developers, reverse-engineers, and security researchers"
|
||||
TERMUX_PKG_LICENSE="wxWindows"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
_MAJOR_VERSION=15
|
||||
_MINOR_VERSION=1
|
||||
_MICRO_VERSION=12
|
||||
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.${_MINOR_VERSION}.${_MICRO_VERSION}
|
||||
TERMUX_PKG_GIT_BRANCH=$TERMUX_PKG_VERSION
|
||||
TERMUX_PKG_SRCURL=https://github.com/frida/frida.git
|
||||
TERMUX_PKG_DEPENDS="libiconv, python"
|
||||
TERMUX_PKG_BUILD_DEPENDS="openssl"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
TERMUX_PKG_NO_STATICSPLIT=true
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="ANDROID_NDK_ROOT=$NDK"
|
||||
TERMUX_PKG_CONFFILES="var/service/frida-server/run var/service/frida-server/down"
|
||||
|
||||
termux_step_pre_configure () {
|
||||
_PYTHON_VERSION=$(source $TERMUX_SCRIPTDIR/packages/python/build.sh; echo $_MAJOR_VERSION)
|
||||
export TERMUX_PKG_EXTRA_MAKE_ARGS+=" PYTHON=/usr/bin/python${_PYTHON_VERSION}"
|
||||
sed -e "s%@TERMUX_PREFIX@%$TERMUX_PREFIX%g" \
|
||||
-e "s%@PYTHON_VERSION@%$_PYTHON_VERSION%g" \
|
||||
$TERMUX_PKG_BUILDER_DIR/frida-python-version.diff | patch -Np1
|
||||
}
|
||||
|
||||
termux_step_host_build () {
|
||||
local node_version=14.18.1
|
||||
termux_download https://nodejs.org/dist/v${node_version}/node-v${node_version}-linux-x64.tar.xz \
|
||||
${TERMUX_PKG_CACHEDIR}/node-v${node_version}-linux-x64.tar.xz \
|
||||
ad1e3baa1aee8028b43206da3b2be9b8867cb598b4318bc88a0ae4518cc062a2
|
||||
tar -xf ${TERMUX_PKG_CACHEDIR}/node-v${node_version}-linux-x64.tar.xz --strip-components=1
|
||||
}
|
||||
|
||||
termux_step_post_configure () {
|
||||
# frida-version.h is normally generated from git and the commits.
|
||||
sed -i "s/@TERMUX_PKG_VERSION@/$TERMUX_PKG_VERSION/g" ${TERMUX_PKG_SRCDIR}/build/frida-version.h
|
||||
sed -i "s/@_MAJOR_VERSION@/$_MAJOR_VERSION/g" ${TERMUX_PKG_SRCDIR}/build/frida-version.h
|
||||
sed -i "s/@_MINOR_VERSION@/$_MINOR_VERSION/g" ${TERMUX_PKG_SRCDIR}/build/frida-version.h
|
||||
sed -i "s/@_MICRO_VERSION@/$_MICRO_VERSION/g" ${TERMUX_PKG_SRCDIR}/build/frida-version.h
|
||||
}
|
||||
|
||||
termux_step_make () {
|
||||
if [[ ${TERMUX_ARCH} == "aarch64" ]]; then
|
||||
arch=arm64
|
||||
elif [[ ${TERMUX_ARCH} == "i686" ]]; then
|
||||
arch=x86
|
||||
else
|
||||
arch=${TERMUX_ARCH}
|
||||
fi
|
||||
CC=gcc CXX=g++ PATH=${TERMUX_PKG_HOSTBUILD_DIR}/bin:$PATH \
|
||||
make python-android-${arch} ${TERMUX_PKG_EXTRA_MAKE_ARGS}
|
||||
CC=gcc CXX=g++ PATH=${TERMUX_PKG_HOSTBUILD_DIR}/bin:$PATH \
|
||||
make tools-android-${arch} ${TERMUX_PKG_EXTRA_MAKE_ARGS}
|
||||
}
|
||||
|
||||
termux_step_make_install () {
|
||||
install build/frida-android-${arch}/bin/frida-server \
|
||||
build/frida-android-${arch}/bin/frida-inject \
|
||||
build/frida-android-${arch}/bin/frida-discover \
|
||||
build/frida-android-${arch}/bin/frida \
|
||||
build/frida-android-${arch}/bin/frida-kill \
|
||||
build/frida-android-${arch}/bin/frida-ls-devices \
|
||||
build/frida-android-${arch}/bin/frida-ps \
|
||||
build/frida-android-${arch}/bin/frida-trace \
|
||||
${TERMUX_PREFIX}/bin/
|
||||
install build/frida-android-${arch}/lib/{*.so,*.a} ${TERMUX_PREFIX}/lib/
|
||||
cp -r build/frida-android-${arch}/lib/{pkgconfig,python*} ${TERMUX_PREFIX}/lib/
|
||||
cp -r build/frida-android-${arch}/include/frida-* ${TERMUX_PREFIX}/include/
|
||||
cp -r build/frida-android-${arch}/share/vala ${TERMUX_PREFIX}/share/
|
||||
}
|
||||
|
||||
termux_step_post_make_install () {
|
||||
# Setup termux-services scripts
|
||||
mkdir -p $TERMUX_PREFIX/var/service/frida-server/log
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "unset LD_PRELOAD"
|
||||
echo "exec su -c $TERMUX_PREFIX/bin/frida-server 2>&1"
|
||||
} > $TERMUX_PREFIX/var/service/frida-server/run
|
||||
|
||||
# Unfortunately, running sv down frida-server just kills the "su" process but leaves frida-server
|
||||
# running (even though it is running in the foreground). This finish script works around that.
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "su -c pkill -9 frida-server"
|
||||
} > $TERMUX_PREFIX/var/service/frida-server/finish
|
||||
chmod u+x $TERMUX_PREFIX/var/service/frida-server/run $TERMUX_PREFIX/var/service/frida-server/finish
|
||||
|
||||
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger $TERMUX_PREFIX/var/service/frida-server/log/run
|
||||
|
||||
touch $TERMUX_PREFIX/var/service/frida-server/down
|
||||
}
|
26
root-packages/frida-server/compiler.patch
Normal file
26
root-packages/frida-server/compiler.patch
Normal file
@ -0,0 +1,26 @@
|
||||
--- ./releng/setup-env.sh.orig_CC 2020-12-05 16:35:01.103852860 +0100
|
||||
+++ ./releng/setup-env.sh 2020-12-05 16:35:07.473842975 +0100
|
||||
@@ -929,9 +929,9 @@
|
||||
echo "export VALAC=\"$VALAC\""
|
||||
echo "export CPP=\"$CPP\""
|
||||
echo "export CPPFLAGS=\"$CPPFLAGS\""
|
||||
- echo "export CC=\"$CC\""
|
||||
+ echo "export CC=\"gcc\""
|
||||
echo "export CFLAGS=\"$CFLAGS\""
|
||||
- echo "export CXX=\"$CXX\""
|
||||
+ echo "export CXX=\"g++\""
|
||||
echo "export CXXFLAGS=\"$CXXFLAGS\""
|
||||
echo "export LD=\"$LD\""
|
||||
echo "export LDFLAGS=\"$LDFLAGS\""
|
||||
@@ -990,9 +990,9 @@
|
||||
echo "export PKG_CONFIG_PATH=\"\""
|
||||
echo "export VALAC=\"$VALAC\""
|
||||
echo "export CPPFLAGS=\"$CPPFLAGS\""
|
||||
- echo "export CC=\"$CC\""
|
||||
+ echo "export CC=\"gcc\""
|
||||
echo "export CFLAGS=\"$CFLAGS\""
|
||||
- echo "export CXX=\"$CXX\""
|
||||
+ echo "export CXX=\"g++\""
|
||||
echo "export CXXFLAGS=\"$CXXFLAGS\""
|
||||
echo "export LDFLAGS=\"$LDFLAGS\""
|
||||
echo "export AR=\"$AR\""
|
10
root-packages/frida-server/frida-dev.subpackage.sh
Normal file
10
root-packages/frida-server/frida-dev.subpackage.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_SUBPKG_DESCRIPTION="Development files for frida"
|
||||
TERMUX_SUBPKG_CONFLICTS="frida-server (<< 14.2.13)"
|
||||
TERMUX_SUBPKG_REPLACES="frida-server (<< 14.2.13)"
|
||||
TERMUX_SUBPKG_INCLUDE="
|
||||
lib/*.so
|
||||
lib/*.a
|
||||
lib/pkgconfig
|
||||
include/frida-*
|
||||
share/vala
|
||||
"
|
12
root-packages/frida-server/frida-python-src-_frida.c.patch
Normal file
12
root-packages/frida-server/frida-python-src-_frida.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- ../frida-python-src-_frida.c.orig 2020-03-25 09:09:39.556304220 +0100
|
||||
+++ ./frida-python/src/_frida.c 2020-03-25 09:27:46.744314351 +0100
|
||||
@@ -1879,6 +1879,9 @@
|
||||
static int
|
||||
PyDeviceManager_init (PyDeviceManager * self, PyObject * args, PyObject * kw)
|
||||
{
|
||||
+ printf ("patching selinux policy\n");
|
||||
+ frida_selinux_patch_policy ();
|
||||
+
|
||||
if (PyGObjectType.tp_init ((PyObject *) self, args, kw) < 0)
|
||||
return -1;
|
||||
|
@ -0,0 +1,13 @@
|
||||
--- ../frida-python-src-meson.build.orig 2020-03-25 07:54:47.948054199 +0100
|
||||
+++ ./frida-python/src/meson.build 2020-03-25 08:44:34.189059770 +0100
|
||||
@@ -9,8 +9,8 @@
|
||||
name_prefix: '',
|
||||
name_suffix: 'so',
|
||||
c_args: frida_component_cflags,
|
||||
- include_directories: include_directories(python_incdir),
|
||||
- link_args: extra_link_args,
|
||||
+ include_directories: include_directories('@TERMUX_PREFIX@/include', python_incdir),
|
||||
+ link_args: extra_link_args + ['../frida-core/lib/selinux/libfrida-selinux.a'],
|
||||
dependencies: [frida_core_dep],
|
||||
install: true,
|
||||
install_dir: python_site_packages,
|
21
root-packages/frida-server/frida-python-version.diff
Normal file
21
root-packages/frida-server/frida-python-version.diff
Normal file
@ -0,0 +1,21 @@
|
||||
--- ../frida-python-src-meson.build.orig 2020-03-25 07:54:47.948054199 +0100
|
||||
+++ ./frida-python/src/meson.build 2020-03-25 08:44:34.189059770 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-extra_link_args = []
|
||||
+extra_link_args = ['-L@TERMUX_PREFIX@/lib', '-lpython@PYTHON_VERSION@']
|
||||
if host_os_family == 'darwin'
|
||||
extra_link_args += ['-Wl,-exported_symbol,_' + python_plugin_export_name]
|
||||
elif host_os_family != 'windows'
|
||||
--- ./Makefile.linux.mk.orig 2020-07-22 19:15:43.163995037 +0000
|
||||
+++ ./Makefile.linux.mk 2020-07-22 19:19:19.060924976 +0000
|
||||
@@ -333,8 +333,8 @@
|
||||
--cross-file build/$1-$$*.txt \
|
||||
--prefix $$(FRIDA)/build/$1-$$* \
|
||||
--libdir $$(FRIDA)/build/$1-$$*/lib \
|
||||
- -Dpython=$$(PYTHON) \
|
||||
- -Dpython_incdir=$$(PYTHON_INCDIR) \
|
||||
+ -Dpython=/usr/bin/python@PYTHON_VERSION@ \
|
||||
+ -Dpython_incdir=@TERMUX_PREFIX@/include/python@PYTHON_VERSION@ \
|
||||
frida-python $$$$builddir || exit 1; \
|
||||
fi; \
|
||||
$$(NINJA) -C $$$$builddir install || exit 1; \
|
8
root-packages/frida-server/frida-python.subpackage.sh
Normal file
8
root-packages/frida-server/frida-python.subpackage.sh
Normal file
@ -0,0 +1,8 @@
|
||||
TERMUX_SUBPKG_DESCRIPTION="Python bindings for Frida"
|
||||
TERMUX_SUBPKG_INCLUDE="lib/python*"
|
||||
|
||||
termux_step_create_subpkg_debscripts() {
|
||||
_PYTHON_VERSION=$(source $TERMUX_SCRIPTDIR/packages/python/build.sh; echo $_MAJOR_VERSION)
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "pip${_PYTHON_VERSION} install wcwidth colorama pygments" >> postinst
|
||||
}
|
16
root-packages/frida-server/frida-tools.subpackage.sh
Normal file
16
root-packages/frida-server/frida-tools.subpackage.sh
Normal file
@ -0,0 +1,16 @@
|
||||
TERMUX_SUBPKG_DESCRIPTION="CLI tools for Frida"
|
||||
TERMUX_SUBPKG_DEPENDS="frida-python"
|
||||
TERMUX_SUBPKG_INCLUDE="
|
||||
bin/frida-discover
|
||||
bin/frida
|
||||
bin/frida-kill
|
||||
bin/frida-ls-devices
|
||||
bin/frida-ps
|
||||
bin/frida-trace
|
||||
"
|
||||
|
||||
termux_step_create_subpkg_debscripts() {
|
||||
_PYTHON_VERSION=$(source $TERMUX_SCRIPTDIR/packages/python/build.sh; echo $_MAJOR_VERSION)
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "pip${_PYTHON_VERSION} install prompt_toolkit colorama pygments" >> postinst
|
||||
}
|
16
root-packages/frida-server/frida-version.patch
Normal file
16
root-packages/frida-server/frida-version.patch
Normal file
@ -0,0 +1,16 @@
|
||||
frida-version.h is normally generated from git
|
||||
--- /dev/null 2018-03-05 09:14:44.324251389 +0000
|
||||
+++ ./build/frida-version.h 2018-03-05 10:37:42.372271356 +0000
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* @TERMUX_PKG_VERSION@.0 */
|
||||
+#ifndef __FRIDA_VERSION_H__
|
||||
+#define __FRIDA_VERSION_H__
|
||||
+
|
||||
+#define FRIDA_VERSION "@TERMUX_PKG_VERSION@"
|
||||
+
|
||||
+#define FRIDA_MAJOR_VERSION @_MAJOR_VERSION@
|
||||
+#define FRIDA_MINOR_VERSION @_MINOR_VERSION@
|
||||
+#define FRIDA_MICRO_VERSION @_MICRO_VERSION@
|
||||
+#define FRIDA_NANO_VERSION 0
|
||||
+
|
||||
+#endif
|
11
root-packages/frida-server/ndk_version.patch
Normal file
11
root-packages/frida-server/ndk_version.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./releng/setup-env.sh.orig 2021-12-05 13:14:56.373457925 +0100
|
||||
+++ ./releng/setup-env.sh 2021-12-05 13:16:27.716458982 +0100
|
||||
@@ -123,7 +123,7 @@
|
||||
fi
|
||||
|
||||
if [ "$host_os" == "android" ]; then
|
||||
- ndk_required=24
|
||||
+ ndk_required=23
|
||||
if [ -n "$ANDROID_NDK_ROOT" ]; then
|
||||
if [ -f "$ANDROID_NDK_ROOT/source.properties" ]; then
|
||||
ndk_installed_version=$(grep Pkg.Revision "$ANDROID_NDK_ROOT/source.properties" | awk '{ split($NF, v, "."); print v[1]; }')
|
38
root-packages/frida-server/setup-env.sh.patch
Normal file
38
root-packages/frida-server/setup-env.sh.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- ./releng/setup-env.sh.orig 2021-12-05 14:17:02.109846250 +0100
|
||||
+++ ./releng/setup-env.sh 2021-12-05 14:21:05.179490094 +0100
|
||||
@@ -668,7 +668,7 @@
|
||||
host_cxxlibs="c++_static c++abi"
|
||||
case $host_arch in
|
||||
x86)
|
||||
- android_api=19
|
||||
+ android_api=24
|
||||
android_abi="x86"
|
||||
android_target="i686-none-linux-android${android_api}"
|
||||
android_clang_arch="i386"
|
||||
@@ -679,7 +679,7 @@
|
||||
host_cxxlibs="$host_cxxlibs android_support"
|
||||
;;
|
||||
x86_64)
|
||||
- android_api=21
|
||||
+ android_api=24
|
||||
android_abi="x86_64"
|
||||
android_target="x86_64-none-linux-android${android_api}"
|
||||
android_clang_arch="x86_64"
|
||||
@@ -687,7 +687,7 @@
|
||||
host_ldflags=""
|
||||
;;
|
||||
arm)
|
||||
- android_api=19
|
||||
+ android_api=24
|
||||
android_abi="armeabi-v7a"
|
||||
android_target="armv7-none-linux-androideabi${android_api}"
|
||||
android_clang_arch="arm"
|
||||
@@ -698,7 +698,7 @@
|
||||
host_cxxlibs="$host_cxxlibs android_support"
|
||||
;;
|
||||
arm64)
|
||||
- android_api=21
|
||||
+ android_api=24
|
||||
android_abi="arm64-v8a"
|
||||
android_target="aarch64-none-linux-android${android_api}"
|
||||
android_clang_arch="aarch64"
|
16
root-packages/gptfdisk/build.sh
Normal file
16
root-packages/gptfdisk/build.sh
Normal file
@ -0,0 +1,16 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.rodsbooks.com/gdisk/
|
||||
TERMUX_PKG_DESCRIPTION="A text-mode partitioning tool that works on GUID Partition Table (GPT) disks"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.0.5
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/gptfdisk/files/gptfdisk/$TERMUX_PKG_VERSION/gptfdisk-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=0e7d3987cd0488ecaf4b48761bc97f40b1dc089e5ff53c4b37abe30bc67dcb2f
|
||||
TERMUX_PKG_DEPENDS="libpopt, libuuid, ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make_install() {
|
||||
install -d "$TERMUX_PREFIX"/{bin,share/{doc/gdisk,man/man8}}
|
||||
install -t "$TERMUX_PREFIX"/bin/ {,c,s}gdisk fixparts
|
||||
install -m600 -t "$TERMUX_PREFIX"/share/man/man8/ {{,c,s}gdisk,fixparts}.8
|
||||
}
|
43
root-packages/hping3/Makefile.in.patch
Normal file
43
root-packages/hping3/Makefile.in.patch
Normal file
@ -0,0 +1,43 @@
|
||||
--- ./Makefile.in 2004-04-09 23:38:56.000000000 +0000
|
||||
+++ ../Makefile.in 2018-03-11 08:07:34.518323429 +0000
|
||||
@@ -6,7 +6,7 @@
|
||||
# $date: Sun Jul 25 17:56:15 MET DST 1999$
|
||||
# $rev: 3$
|
||||
|
||||
-CC= gcc
|
||||
+CC ?= gcc
|
||||
AR=/usr/bin/ar
|
||||
RANLIB=/usr/bin/ranlib
|
||||
CCOPT= -O2 -Wall @PCAP_INCLUDE@ @TCL_INC@ @USE_TCL@
|
||||
@@ -50,14 +50,13 @@
|
||||
$(RANLIB) $@
|
||||
|
||||
hping3: byteorder.h $(OBJ)
|
||||
- $(CC) -o hping3 $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@
|
||||
+ $(CC) -o hping3 $(CCOPT) $(CPPFLAGS) $(LDFLAGS) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@ @TCL_LIB@
|
||||
@echo
|
||||
- ./hping3 -v
|
||||
@echo "use \`make strip' to strip hping3 binary"
|
||||
@echo "use \`make install' to install hping3"
|
||||
|
||||
hping3-static: byteorder.h $(OBJ)
|
||||
- $(CC) -static -o hping3-static $(CCOPT) $(DEBUG) $(OBJ) -L/usr/local/lib $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
|
||||
+ $(CC) -static -o hping3-static $(CCOPT) $(CPPFLAGS) $(LDFLAGS) $(DEBUG) $(OBJ) $(PCAP) @SOLARISLIB@ @TCL_LIB@ -ldl
|
||||
|
||||
byteorder.h:
|
||||
./configure
|
||||
@@ -72,10 +71,10 @@
|
||||
rm -rf hping3 *.o byteorder byteorder.h systype.h Makefile libars.a .depend
|
||||
|
||||
install: hping3
|
||||
- cp -f hping3 /usr/sbin/
|
||||
- chmod 755 /usr/sbin/hping3
|
||||
- ln -s /usr/sbin/hping3 /usr/sbin/hping
|
||||
- ln -s /usr/sbin/hping3 /usr/sbin/hping2
|
||||
+ cp -f hping3 $(PREFIX)/bin/
|
||||
+ chmod 755 $(PREFIX)/bin/hping3
|
||||
+ ln -sf $(PREFIX)/bin/hping3 $(PREFIX)/bin/hping
|
||||
+ ln -sf $(PREFIX)/bin/hping3 $(PREFIX)/bin/hping2
|
||||
@if [ -d ${INSTALL_MANPATH}/man8 ]; then \
|
||||
cp ./docs/hping3.8 ${INSTALL_MANPATH}/man8; \
|
||||
chmod 644 ${INSTALL_MANPATH}/man8/hping3.8; \
|
17
root-packages/hping3/build.sh
Normal file
17
root-packages/hping3/build.sh
Normal file
@ -0,0 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.hping.org/
|
||||
TERMUX_PKG_DESCRIPTION="hping is a command-line oriented TCP/IP packet assembler/analyzer."
|
||||
# Same versioning as archlinux:
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=3.0.0
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=http://www.hping.org/hping3-20051105.tar.gz
|
||||
TERMUX_PKG_SHA256=f5a671a62a11dc8114fa98eade19542ed1c3aa3c832b0e572ca0eb1a5a4faee8
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libpcap, tcl"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_post_configure () {
|
||||
LDFLAGS+=" -Wl,-z,muldefs"
|
||||
export LDFLAGS+=" -landroid-shmem"
|
||||
mkdir -p ${TERMUX_PREFIX}/share/man/man8
|
||||
}
|
25
root-packages/hping3/bytesex.h.patch
Normal file
25
root-packages/hping3/bytesex.h.patch
Normal file
@ -0,0 +1,25 @@
|
||||
--- ./bytesex.h 2003-08-31 17:23:48.000000000 +0000
|
||||
+++ ../bytesex.h.orig 2018-03-11 08:02:45.020774804 +0000
|
||||
@@ -7,17 +7,11 @@
|
||||
#ifndef ARS_BYTESEX_H
|
||||
#define ARS_BYTESEX_H
|
||||
|
||||
-#if defined(__i386__) \
|
||||
- || defined(__alpha__) \
|
||||
- || (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
|
||||
-#define BYTE_ORDER_LITTLE_ENDIAN
|
||||
-#elif defined(__mc68000__) \
|
||||
- || defined (__sparc__) \
|
||||
- || defined (__sparc) \
|
||||
- || defined (__PPC__) \
|
||||
- || defined (__BIG_ENDIAN__) \
|
||||
- || (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
|
||||
-#define BYTE_ORDER_BIG_ENDIAN
|
||||
+#include <endian.h>
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# define BYTE_ORDER_LITTLE_ENDIAN
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
+# define BYTE_ORDER_BIG_ENDIAN
|
||||
#else
|
||||
# error can not find the byte order for this architecture, fix bytesex.h
|
||||
#endif
|
81
root-packages/hping3/configure.patch
Normal file
81
root-packages/hping3/configure.patch
Normal file
@ -0,0 +1,81 @@
|
||||
--- ./configure 2004-06-04 06:39:10.000000000 +0000
|
||||
+++ ../configure 2018-03-11 08:11:27.716604849 +0000
|
||||
@@ -13,16 +13,13 @@
|
||||
exit 0
|
||||
fi
|
||||
|
||||
-CC=${CC:=cc}
|
||||
-
|
||||
-echo build byteorder.c...
|
||||
-$CC byteorder.c -o byteorder || exit 1
|
||||
+#CC = $CC
|
||||
|
||||
INSTALL_MANPATH=`echo $MANPATH|cut -f1 -d:`
|
||||
if [ "$INSTALL_MANPATH" = "" ]; then
|
||||
- INSTALL_MANPATH="/usr/local/man"
|
||||
+ INSTALL_MANPATH="@TERMUX_PREFIX@/share/man"
|
||||
fi
|
||||
-BYTEORDER=`./byteorder -m`
|
||||
+BYTEORDER=__LITTLE_ENDIAN_BITFIELD
|
||||
|
||||
echo create byteorder.h...
|
||||
cat > byteorder.h <<EOF
|
||||
@@ -61,46 +58,13 @@
|
||||
#
|
||||
# TCL detection
|
||||
#
|
||||
-for TCLPATH_TRY in "/usr/bin/" "/usr/local/bin/" "/bin/"
|
||||
-do
|
||||
- for TCLVER_TRY in "8.4" "8.3" "8.2" "8.1" "8.0"
|
||||
- do
|
||||
- if [ -z $TCLSH ]
|
||||
- then
|
||||
- TCLSH_TRY=${TCLPATH_TRY}tclsh${TCLVER_TRY}
|
||||
- if [ -f $TCLSH_TRY ]
|
||||
- then
|
||||
- TCLSH=$TCLSH_TRY
|
||||
- echo "===> Found Tclsh in: $TCLSH"
|
||||
- fi
|
||||
- fi
|
||||
- done
|
||||
-done
|
||||
-if [ -f $TCLSH ]
|
||||
-then
|
||||
- TCL_VER=`echo puts \\$tcl_version | $TCLSH -`
|
||||
- USE_TCL='-DUSE_TCL'
|
||||
- TCL_LIB="-ltcl${TCL_VER}"
|
||||
- if [ -e /usr/include/tcl${TCL_VER} ]
|
||||
- then
|
||||
- TCL_INC="-I/usr/include/tcl${TCL_VER}"
|
||||
- elif [ -e /usr/include/tcl.h ]
|
||||
- then
|
||||
- TCL_INC=""
|
||||
- elif [ -e /usr/local/include/tcl${TCL_VER} ]
|
||||
- then
|
||||
- TCL_INC="-I/usr/local/include/tcl${TCL_VER}"
|
||||
- else
|
||||
- USE_TCL=""
|
||||
- TCL_LIB=""
|
||||
- echo "==> WARNING: no Tcl header files found!"
|
||||
- fi
|
||||
-fi
|
||||
+USE_TCL='-DUSE_TCL'
|
||||
if [ -n $USE_TCL ]
|
||||
then
|
||||
- LIBPOSTFIX=`ls -1 /usr/local/lib/ /usr/lib | grep 'libtcl[0-9]' | grep so | sed -e 's/\.so.*//g' -e 's/libtcl//g' | sort -r | head -1`
|
||||
- TCL_LIB="-ltcl${LIBPOSTFIX} -lm -lpthread"
|
||||
+ LIBPOSTFIX=`ls -1 @TERMUX_PREFIX@/lib | grep 'libtcl[0-9]' | grep so | sed -e 's/\.so.*//g' -e 's/libtcl//g' | sort -r | head -1`
|
||||
+ TCL_LIB="-ltcl${LIBPOSTFIX} -lm"
|
||||
fi
|
||||
+TCL_INC="-I@TERMUX_PREFIX@/include"
|
||||
|
||||
#
|
||||
# configurable stuff
|
||||
@@ -161,6 +125,6 @@
|
||||
EOF
|
||||
|
||||
echo creating dependences...
|
||||
-$CC -MM *.c > .depend
|
||||
+$CC -MM $TCL_INC *.c > .depend
|
||||
|
||||
echo now you can try \`make\'
|
8
root-packages/hping3/hstring.h.patch
Normal file
8
root-packages/hping3/hstring.h.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- ./hstring.h 2003-08-31 17:23:59.000000000 +0000
|
||||
+++ ../hstring.h 2018-03-10 23:20:36.668108131 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-#ifndef HPING_HSTRNIG_H
|
||||
+#ifndef HPING_HSTRING_H
|
||||
#define HPING_HSTRING_H
|
||||
|
||||
int strisnum(char *s);
|
11
root-packages/hping3/libpcap_stuff.c.patch
Normal file
11
root-packages/hping3/libpcap_stuff.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- hping3-20051105/libpcap_stuff.c 2018-02-28 13:08:48.827000712 +0530
|
||||
+++ hping3-3.0.0/libpcap_stuff.c 2018-02-11 18:37:24.000000000 +0530
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <pcap.h>
|
||||
-#include <net/bpf.h>
|
||||
+#include <pcap/bpf.h>
|
||||
|
||||
#include "globals.h"
|
||||
|
11
root-packages/hping3/scan.c.patch
Normal file
11
root-packages/hping3/scan.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./scan.c 2003-10-22 10:41:00.000000000 +0000
|
||||
+++ ../scan.c.orig 2018-03-11 08:03:58.728427646 +0000
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#endif
|
||||
#include <sys/shm.h>
|
||||
-#include <sys/sem.h>
|
||||
+#include <linux/sem.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
#include <sys/time.h>
|
11
root-packages/hping3/script.c.patch
Normal file
11
root-packages/hping3/script.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- hping3-20051105/script.c 2018-02-28 13:08:48.837000712 +0530
|
||||
+++ hping3-3.0.0/script.c 2018-02-11 20:10:14.000000000 +0530
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <pcap.h>
|
||||
-#include <net/bpf.h>
|
||||
+#include <pcap/bpf.h>
|
||||
|
||||
#include "release.h"
|
||||
#include "hping2.h"
|
18
root-packages/hw-probe/build.sh
Normal file
18
root-packages/hw-probe/build.sh
Normal file
@ -0,0 +1,18 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/linuxhw/hw-probe
|
||||
TERMUX_PKG_DESCRIPTION="Tool to probe for hardware and check its operability"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.6.4
|
||||
TERMUX_PKG_SRCURL=https://github.com/linuxhw/hw-probe/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=3dc0d0b4b7a9ff65a7937f1b1ca3a36b9360ead0d6770f2a9abceff486d44274
|
||||
TERMUX_PKG_DEPENDS="curl, hwinfo, net-tools, perl"
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make() {
|
||||
:
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 hw-probe.pl "$TERMUX_PREFIX"/bin/hw-probe
|
||||
}
|
79
root-packages/hw-probe/hw-probe.pl.patch
Normal file
79
root-packages/hw-probe/hw-probe.pl.patch
Normal file
@ -0,0 +1,79 @@
|
||||
--- ./hw-probe.pl.orig 2020-01-15 12:58:41.000000000 +0100
|
||||
+++ ./hw-probe.pl 2020-02-14 21:30:39.736517524 +0100
|
||||
@@ -193,7 +193,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-my $PROBE_DIR = "/root/HW_PROBE";
|
||||
+my $PROBE_DIR = "@TERMUX_HOME@/HW_PROBE";
|
||||
|
||||
if($Opt{"Snap"}) {
|
||||
$PROBE_DIR = $ENV{"SNAP_USER_COMMON"}."/HW_PROBE";
|
||||
@@ -2624,11 +2624,11 @@
|
||||
$Path = $Opt{"PnpIDs"};
|
||||
}
|
||||
else {
|
||||
- $Path = "/usr/share/hwdata/pnp.ids"; # ROSA Fresh, RELS
|
||||
+ $Path = "@TERMUX_PREFIX@/share/hwdata/pnp.ids"; # ROSA Fresh, RELS
|
||||
}
|
||||
|
||||
if(not -e $Path) {
|
||||
- $Path = "/usr/share/misc/pnp.ids"; # ROSA Marathon
|
||||
+ $Path = "@TERMUX_PREFIX@/share/misc/pnp.ids"; # ROSA Marathon
|
||||
}
|
||||
|
||||
if(not -e $Path) {
|
||||
@@ -2664,7 +2664,7 @@
|
||||
|
||||
sub readVendorIds()
|
||||
{
|
||||
- my $Path = "/usr/share/hwdata/pci.ids";
|
||||
+ my $Path = "@TERMUX_PREFIX@/share/hwdata/pci.ids";
|
||||
|
||||
if($Opt{"PciIDs"}) {
|
||||
$Path = $Opt{"PciIDs"};
|
||||
@@ -6492,7 +6492,7 @@
|
||||
else
|
||||
{
|
||||
listProbe("logs", "xorg.log");
|
||||
- $XLog = readFile("/var/log/Xorg.0.log");
|
||||
+ $XLog = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log");
|
||||
|
||||
if(not $XLog)
|
||||
{
|
||||
@@ -10394,7 +10394,7 @@
|
||||
if(enabledLog("xorg.log.1"))
|
||||
{
|
||||
listProbe("logs", "xorg.log.1");
|
||||
- my $XLog_Old = readFile("/var/log/Xorg.0.log.old");
|
||||
+ my $XLog_Old = readFile("@TERMUX_PREFIX@/var/log/Xorg.0.log.old");
|
||||
|
||||
if(not $XLog_Old)
|
||||
{
|
||||
@@ -11233,7 +11233,7 @@
|
||||
{
|
||||
my $MAX_P_LEN = 1000;
|
||||
|
||||
- my $ELog = "/var/log/cups/error_log";
|
||||
+ my $ELog = "@TERMUX_PREFIX@/var/log/cups/error_log";
|
||||
if(enabledLog("cups_error_log") and -e $ELog)
|
||||
{
|
||||
listProbe("logs", "cups_error_log");
|
||||
@@ -11244,7 +11244,7 @@
|
||||
writeLog($LOG_DIR."/cups_error_log", $CupsError);
|
||||
}
|
||||
|
||||
- my $ALog = "/var/log/cups/access_log";
|
||||
+ my $ALog = "@TERMUX_PREFIX@/var/log/cups/access_log";
|
||||
if(enabledLog("cups_access_log") and -e $ALog)
|
||||
{
|
||||
listProbe("logs", "cups_access_log");
|
||||
@@ -12246,7 +12246,7 @@
|
||||
}
|
||||
|
||||
sub readSdioIds_Sys() {
|
||||
- readSdioIds("/usr/share/hwdata/sdio.ids", \%SdioInfo, \%SdioVendor);
|
||||
+ readSdioIds("@TERMUX_PREFIX@/share/hwdata/sdio.ids", \%SdioInfo, \%SdioVendor);
|
||||
}
|
||||
|
||||
sub readSdioIds($$$)
|
57
root-packages/hwinfo/Makefile.patch
Normal file
57
root-packages/hwinfo/Makefile.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -uNr hwinfo-21.67/Makefile hwinfo-21.67.mod/Makefile
|
||||
--- hwinfo-21.67/Makefile 2019-07-19 16:56:55.000000000 +0300
|
||||
+++ hwinfo-21.67.mod/Makefile 2019-09-19 16:06:38.975880821 +0300
|
||||
@@ -22,11 +22,7 @@
|
||||
|
||||
include Makefile.common
|
||||
|
||||
-ifeq "$(ARCH)" "x86_64"
|
||||
-LIBDIR ?= /usr/lib64
|
||||
-else
|
||||
-LIBDIR ?= /usr/lib
|
||||
-endif
|
||||
+LIBDIR = /lib
|
||||
ULIBDIR = $(LIBDIR)
|
||||
|
||||
# ia64
|
||||
@@ -102,11 +98,11 @@
|
||||
@cd doc ; doxygen libhd.doxy
|
||||
|
||||
install:
|
||||
- install -d -m 755 $(DESTDIR)/sbin $(DESTDIR)/usr/sbin $(DESTDIR)$(ULIBDIR) \
|
||||
- $(DESTDIR)$(ULIBDIR)/pkgconfig $(DESTDIR)/usr/include
|
||||
- install -m 755 hwinfo $(DESTDIR)/usr/sbin
|
||||
- install -m 755 src/ids/check_hd $(DESTDIR)/usr/sbin
|
||||
- install -m 755 src/ids/convert_hd $(DESTDIR)/usr/sbin
|
||||
+ install -d -m 755 $(DESTDIR)/bin $(DESTDIR)/usr/bin $(DESTDIR)$(ULIBDIR) \
|
||||
+ $(DESTDIR)$(ULIBDIR)/pkgconfig $(DESTDIR)/include
|
||||
+ install -m 755 hwinfo $(DESTDIR)/bin
|
||||
+ install -m 755 src/ids/check_hd $(DESTDIR)/bin
|
||||
+ install -m 755 src/ids/convert_hd $(DESTDIR)/bin
|
||||
if [ -f $(LIBHD_SO) ] ; then \
|
||||
install $(LIBHD_SO) $(DESTDIR)$(ULIBDIR) ; \
|
||||
ln -snf $(LIBHD_NAME) $(DESTDIR)$(ULIBDIR)/$(LIBHD_SONAME) ; \
|
||||
@@ -115,15 +111,15 @@
|
||||
install -m 644 $(LIBHD) $(DESTDIR)$(ULIBDIR) ; \
|
||||
fi
|
||||
install -m 644 hwinfo.pc $(DESTDIR)$(ULIBDIR)/pkgconfig
|
||||
- install -m 644 src/hd/hd.h $(DESTDIR)/usr/include
|
||||
- perl -pi -e "s/define\s+HD_VERSION\b.*/define HD_VERSION\t\t$(LIBHD_MAJOR_VERSION)/" $(DESTDIR)/usr/include/hd.h
|
||||
- perl -pi -e "s/define\s+HD_MINOR_VERSION\b.*/define HD_MINOR_VERSION\t$(LIBHD_MINOR_VERSION)/" $(DESTDIR)/usr/include/hd.h
|
||||
- install -m 755 getsysinfo $(DESTDIR)/usr/sbin
|
||||
- install -m 755 src/isdn/cdb/mk_isdnhwdb $(DESTDIR)/usr/sbin
|
||||
- install -d -m 755 $(DESTDIR)/usr/share/hwinfo
|
||||
+ install -m 644 src/hd/hd.h $(DESTDIR)/include
|
||||
+ perl -pi -e "s/define\s+HD_VERSION\b.*/define HD_VERSION\t\t$(LIBHD_MAJOR_VERSION)/" $(DESTDIR)/include/hd.h
|
||||
+ perl -pi -e "s/define\s+HD_MINOR_VERSION\b.*/define HD_MINOR_VERSION\t$(LIBHD_MINOR_VERSION)/" $(DESTDIR)/include/hd.h
|
||||
+ install -m 755 getsysinfo $(DESTDIR)/bin
|
||||
+ install -m 755 src/isdn/cdb/mk_isdnhwdb $(DESTDIR)/bin
|
||||
+ install -d -m 755 $(DESTDIR)/share/hwinfo
|
||||
install -d -m 755 $(DESTDIR)/var/lib/hardware/udi
|
||||
- install -m 644 src/isdn/cdb/ISDN.CDB.txt $(DESTDIR)/usr/share/hwinfo
|
||||
- install -m 644 src/isdn/cdb/ISDN.CDB.hwdb $(DESTDIR)/usr/share/hwinfo
|
||||
+ install -m 644 src/isdn/cdb/ISDN.CDB.txt $(DESTDIR)/share/hwinfo
|
||||
+ install -m 644 src/isdn/cdb/ISDN.CDB.hwdb $(DESTDIR)/share/hwinfo
|
||||
|
||||
archive: changelog
|
||||
@if [ ! -d .git ] ; then echo no git repo ; false ; fi
|
27
root-packages/hwinfo/build.sh
Normal file
27
root-packages/hwinfo/build.sh
Normal file
@ -0,0 +1,27 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/openSUSE/hwinfo
|
||||
TERMUX_PKG_DESCRIPTION="Hardware detection tool from openSUSE"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=21.80
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/openSUSE/hwinfo/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=ea944271793df091af560ac6e82dcd1271aa83f22aeeada031789df1b5407ebe
|
||||
TERMUX_PKG_DEPENDS="libandroid-shmem, libuuid, libx86emu"
|
||||
TERMUX_PKG_BREAKS="hwinfo-dev"
|
||||
TERMUX_PKG_REPLACES="hwinfo-dev"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
sed -i -E '/^SUBDIRS\s*=/d' Makefile
|
||||
echo -e '\n$(LIBHD):\n\t$(MAKE) -C src' >> Makefile
|
||||
echo -e '\t$(CC) -shared $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) \' >> Makefile
|
||||
echo -e '\t\t-Wl,--whole-archive $(LIBHD) -Wl,--no-whole-archive \' >> Makefile
|
||||
echo -e '\t\t-Wl,-soname=$(LIBHD_SONAME) -o $(LIBHD_SO) $(SO_LIBS)' >> Makefile
|
||||
}
|
||||
|
||||
termux_step_configure() {
|
||||
echo 'touch changelog' > git2log
|
||||
LDFLAGS+=" -landroid-shmem"
|
||||
export HWINFO_VERSION="$TERMUX_PKG_VERSION"
|
||||
export DESTDIR="$TERMUX_PREFIX"
|
||||
}
|
13
root-packages/hwinfo/src-hd-bios.c.patch
Normal file
13
root-packages/hwinfo/src-hd-bios.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -uNr hwinfo-21.60/src/hd/bios.c hwinfo-21.60.mod/src/hd/bios.c
|
||||
--- hwinfo-21.60/src/hd/bios.c 2018-10-17 16:23:47.000000000 +0300
|
||||
+++ hwinfo-21.60.mod/src/hd/bios.c 2019-06-26 13:34:45.081793132 +0300
|
||||
@@ -6,9 +6,6 @@
|
||||
#include <byteswap.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#if defined(__i386__) || defined (__x86_64__) || defined(__ia64__)
|
||||
-#include <sys/io.h>
|
||||
-#endif
|
||||
#include <linux/pci.h>
|
||||
|
||||
#include "hd.h"
|
11
root-packages/hwinfo/src-hd-mdt.c.patch
Normal file
11
root-packages/hwinfo/src-hd-mdt.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -uNr hwinfo-21.60/src/hd/mdt.c hwinfo-21.60.mod/src/hd/mdt.c
|
||||
--- hwinfo-21.60/src/hd/mdt.c 2018-10-17 16:23:47.000000000 +0300
|
||||
+++ hwinfo-21.60.mod/src/hd/mdt.c 2019-06-26 13:35:03.021913541 +0300
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
-#include <sys/io.h>
|
||||
#include <sys/time.h>
|
||||
#include <x86emu.h>
|
||||
|
13
root-packages/hwinfo/src-hd-sys.c.patch
Normal file
13
root-packages/hwinfo/src-hd-sys.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -uNr hwinfo-21.60/src/hd/sys.c hwinfo-21.60.mod/src/hd/sys.c
|
||||
--- hwinfo-21.60/src/hd/sys.c 2018-10-17 16:23:47.000000000 +0300
|
||||
+++ hwinfo-21.60.mod/src/hd/sys.c 2019-06-26 13:35:17.695345306 +0300
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
-#if defined(__i386__) || defined (__x86_64__)
|
||||
-#include <sys/io.h>
|
||||
-#endif
|
||||
|
||||
#include "hd.h"
|
||||
#include "hd_int.h"
|
22
root-packages/hwinfo/src-ids-Makefile.patch
Normal file
22
root-packages/hwinfo/src-ids-Makefile.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -uNr hwinfo-21.60/src/ids/Makefile hwinfo-21.60.mod/src/ids/Makefile
|
||||
--- hwinfo-21.60/src/ids/Makefile 2018-10-17 16:23:47.000000000 +0300
|
||||
+++ hwinfo-21.60.mod/src/ids/Makefile 2019-06-25 22:54:25.404041321 +0300
|
||||
@@ -53,11 +53,14 @@
|
||||
check_hd: check_hd.c
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
|
||||
+check_hd_host: check_hd.c
|
||||
+ gcc -O2 $< -o $@
|
||||
+
|
||||
hd_ids.c: hd_ids.h hd_ids_tiny.h
|
||||
|
||||
-hd_ids.h hd.ids: check_hd $(IDFILES)
|
||||
- ./check_hd --check --sort --cfile hd_ids.h $(IDFILES)
|
||||
+hd_ids.h hd.ids: check_hd check_hd_host $(IDFILES)
|
||||
+ ./check_hd_host --check --sort --cfile hd_ids.h $(IDFILES)
|
||||
|
||||
-hd_ids_tiny.h: check_hd hd.ids
|
||||
- ./check_hd --mini --cfile hd_ids_tiny.h --log=hd_tiny.log --out=hd_tiny.ids hd.ids
|
||||
+hd_ids_tiny.h: check_hd check_hd_host hd.ids
|
||||
+ ./check_hd_host --mini --cfile hd_ids_tiny.h --log=hd_tiny.log --out=hd_tiny.ids hd.ids
|
||||
|
57
root-packages/hwinfo/src-isdn-cdb-Makefile.patch
Normal file
57
root-packages/hwinfo/src-isdn-cdb-Makefile.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -uNr hwinfo-21.60/src/isdn/cdb/Makefile hwinfo-21.60.mod/src/isdn/cdb/Makefile
|
||||
--- hwinfo-21.60/src/isdn/cdb/Makefile 2018-10-17 16:23:47.000000000 +0300
|
||||
+++ hwinfo-21.60.mod/src/isdn/cdb/Makefile 2019-06-25 22:54:25.404041321 +0300
|
||||
@@ -1,6 +1,6 @@
|
||||
TOPDIR = ../../..
|
||||
-TARGETS = mk_isdnhwdb isdn_cdb.h ISDN.CDB.hwdb
|
||||
-CLEANFILES = isdn_cdb isdn_cdb.h lex.yy.c ISDN.CDB.txt mk_isdnhwdb ISDN.CDB.hwdb
|
||||
+TARGETS = mk_isdnhwdb mk_isdnhwdb_host isdn_cdb.h ISDN.CDB.hwdb
|
||||
+CLEANFILES = isdn_cdb isdn_cdb_host isdn_cdb.h lex.yy.c ISDN.CDB.txt mk_isdnhwdb ISDN.CDB.hwdb
|
||||
|
||||
include $(TOPDIR)/Makefile.common
|
||||
|
||||
@@ -11,23 +11,40 @@
|
||||
ln -s ISDN.ppc.txt ISDN.CDB.txt; \
|
||||
fi
|
||||
|
||||
-isdn_cdb.h: isdn_cdb ISDN.CDB.txt
|
||||
+isdn_cdb.h: isdn_cdb_host ISDN.CDB.txt
|
||||
rm -f isdn_cdb.h
|
||||
- ./isdn_cdb ISDN.CDB.txt isdn_cdb.h
|
||||
+ ./isdn_cdb_host ISDN.CDB.txt isdn_cdb.h
|
||||
|
||||
lex.yy.c: isdn_cdb.lex
|
||||
lex isdn_cdb.lex
|
||||
|
||||
isdn_cdb: isdn_cdb.o cdb_read.o
|
||||
|
||||
+isdn_cdb_host: isdn_cdb_host.o cdb_read_host.o
|
||||
+ gcc isdn_cdb_host.o cdb_read_host.o -o isdn_cdb_host
|
||||
+
|
||||
mk_isdnhwdb: mk_isdnhwdb.o cdb_read.o
|
||||
|
||||
+mk_isdnhwdb_host: mk_isdnhwdb_host.o cdb_read_host.o
|
||||
+ gcc mk_isdnhwdb_host.o cdb_read_host.o -o mk_isdnhwdb_host
|
||||
+
|
||||
cdb_read.o: cdb_read.c cdb_read.h
|
||||
|
||||
+cdb_read_host.o: cdb_read.c cdb_read.h
|
||||
+ gcc -O2 -I../../hd -c cdb_read.c -o cdb_read_host.o
|
||||
+
|
||||
isdn_cdb.o: isdn_cdb.c cdb_read.h lex.yy.c
|
||||
|
||||
+isdn_cdb_host.o: isdn_cdb.c cdb_read.h lex.yy.c
|
||||
+ gcc -O2 -I../../hd -c isdn_cdb.c -o isdn_cdb_host.o
|
||||
+ gcc -O2 -I../../hd -c lex.yy.c -o lex.yy.host.o
|
||||
+
|
||||
mk_isdnhwdb.o: mk_isdnhwdb.c cdb_read.h lex.yy.c
|
||||
|
||||
-ISDN.CDB.hwdb: mk_isdnhwdb ISDN.CDB.txt
|
||||
+mk_isdnhwdb_host.o: mk_isdnhwdb.c cdb_read.h lex.yy.c
|
||||
+ gcc -O2 -I../../hd -c mk_isdnhwdb.c -o mk_isdnhwdb_host.o
|
||||
+ gcc -O2 -I../../hd -c lex.yy.c -o lex.yy.host.o
|
||||
+
|
||||
+ISDN.CDB.hwdb: mk_isdnhwdb_host ISDN.CDB.txt
|
||||
rm -f ISDN.CDB.hwdb
|
||||
- ./mk_isdnhwdb ISDN.CDB.txt ISDN.CDB.hwdb
|
||||
+ ./mk_isdnhwdb_host ISDN.CDB.txt ISDN.CDB.hwdb
|
11
root-packages/hwinfo/src-isdn-isa-probe.c.patch
Normal file
11
root-packages/hwinfo/src-isdn-isa-probe.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff -uNr hwinfo-21.60/src/isdn/isa_probe.c hwinfo-21.60.mod/src/isdn/isa_probe.c
|
||||
--- hwinfo-21.60/src/isdn/isa_probe.c 2018-10-17 16:23:47.000000000 +0300
|
||||
+++ hwinfo-21.60.mod/src/isdn/isa_probe.c 2019-06-26 13:35:29.558758182 +0300
|
||||
@@ -1,7 +1,6 @@
|
||||
#if defined(__i386__)
|
||||
|
||||
#include <stdio.h>
|
||||
-#include <sys/io.h>
|
||||
|
||||
#include "hd.h"
|
||||
#include "hd_int.h"
|
97
root-packages/iodine/000-fix-name-clashes.patch
Normal file
97
root-packages/iodine/000-fix-name-clashes.patch
Normal file
@ -0,0 +1,97 @@
|
||||
diff -uNr iodine-0.7.0/src/android_dns.h iodine-0.7.0.mod/src/android_dns.h
|
||||
--- iodine-0.7.0/src/android_dns.h 2014-06-16 23:28:43.000000000 +0300
|
||||
+++ iodine-0.7.0.mod/src/android_dns.h 2019-01-20 16:35:42.911541961 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
#ifndef __FIX_ANDROID_H__
|
||||
#define __FIX_ANDROID_H__
|
||||
|
||||
-typedef struct {
|
||||
+/*typedef struct {
|
||||
unsigned id :16;
|
||||
unsigned rd :1;
|
||||
unsigned tc :1;
|
||||
@@ -18,7 +18,7 @@
|
||||
unsigned ancount :16;
|
||||
unsigned nscount :16;
|
||||
unsigned arcount :16;
|
||||
-} HEADER;
|
||||
+} HEADER;*/
|
||||
|
||||
#define NOERROR 0
|
||||
#define FORMERR 1
|
||||
diff -uNr iodine-0.7.0/src/iodined.c iodine-0.7.0.mod/src/iodined.c
|
||||
--- iodine-0.7.0/src/iodined.c 2014-06-16 23:28:43.000000000 +0300
|
||||
+++ iodine-0.7.0.mod/src/iodined.c 2019-01-20 16:37:23.255524447 +0200
|
||||
@@ -92,7 +92,7 @@
|
||||
static int debug;
|
||||
|
||||
#if !defined(BSD) && !defined(__GLIBC__)
|
||||
-static char *__progname;
|
||||
+static char *___progname;
|
||||
#endif
|
||||
|
||||
static int read_dns(int, int, struct query *);
|
||||
@@ -2199,25 +2199,25 @@
|
||||
|
||||
static void
|
||||
usage() {
|
||||
- extern char *__progname;
|
||||
+ extern char *___progname;
|
||||
|
||||
fprintf(stderr, "Usage: %s [-v] [-h] [-c] [-s] [-f] [-D] [-u user] "
|
||||
"[-t chrootdir] [-d device] [-m mtu] [-z context] "
|
||||
"[-l ip address to listen on] [-p port] [-n external ip] "
|
||||
"[-b dnsport] [-P password] [-F pidfile] [-i max idle time] "
|
||||
- "tunnel_ip[/netmask] topdomain\n", __progname);
|
||||
+ "tunnel_ip[/netmask] topdomain\n", ___progname);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
static void
|
||||
help() {
|
||||
- extern char *__progname;
|
||||
+ extern char *___progname;
|
||||
|
||||
fprintf(stderr, "iodine IP over DNS tunneling server\n");
|
||||
fprintf(stderr, "Usage: %s [-v] [-h] [-c] [-s] [-f] [-D] [-u user] "
|
||||
"[-t chrootdir] [-d device] [-m mtu] [-z context] "
|
||||
"[-l ip address to listen on] [-p port] [-n external ip] [-b dnsport] [-P password] "
|
||||
- "[-F pidfile] tunnel_ip[/netmask] topdomain\n", __progname);
|
||||
+ "[-F pidfile] tunnel_ip[/netmask] topdomain\n", ___progname);
|
||||
fprintf(stderr, " -v to print version info and exit\n");
|
||||
fprintf(stderr, " -h to print this help and exit\n");
|
||||
fprintf(stderr, " -c to disable check of client IP/port on each request\n");
|
||||
@@ -2255,7 +2255,7 @@
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
- extern char *__progname;
|
||||
+ extern char *___progname;
|
||||
char *listen_ip;
|
||||
char *errormsg;
|
||||
#ifndef WINDOWS32
|
||||
@@ -2324,11 +2324,11 @@
|
||||
#endif
|
||||
|
||||
#if !defined(BSD) && !defined(__GLIBC__)
|
||||
- __progname = strrchr(argv[0], '/');
|
||||
- if (__progname == NULL)
|
||||
- __progname = argv[0];
|
||||
+ ___progname = strrchr(argv[0], '/');
|
||||
+ if (___progname == NULL)
|
||||
+ ___progname = argv[0];
|
||||
else
|
||||
- __progname++;
|
||||
+ ___progname++;
|
||||
#endif
|
||||
|
||||
memset(password, 0, sizeof(password));
|
||||
@@ -2573,7 +2573,7 @@
|
||||
tzsetwall();
|
||||
#endif
|
||||
#ifndef WINDOWS32
|
||||
- openlog( __progname, LOG_NDELAY, LOG_DAEMON );
|
||||
+ openlog( ___progname, LOG_NDELAY, LOG_DAEMON );
|
||||
#endif
|
||||
|
||||
if (newroot != NULL)
|
14
root-packages/iodine/001-cflags-ldflags.patch
Normal file
14
root-packages/iodine/001-cflags-ldflags.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -uNr iodine-0.7.0/src/Makefile iodine-0.7.0.mod/src/Makefile
|
||||
--- iodine-0.7.0/src/Makefile 2014-06-16 23:28:43.000000000 +0300
|
||||
+++ iodine-0.7.0.mod/src/Makefile 2019-01-20 16:37:52.923519072 +0200
|
||||
@@ -8,8 +8,8 @@
|
||||
ARCH = `uname -m`
|
||||
|
||||
LIBPATH = -L.
|
||||
-LDFLAGS += -lz `sh osflags $(TARGETOS) link` $(LIBPATH)
|
||||
-CFLAGS += -std=c99 -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags`
|
||||
+LDFLAGS += -lz -llog `sh osflags $(TARGETOS) link` $(LIBPATH)
|
||||
+CFLAGS += -DANDROID -std=c99 -c -g -Wall -D$(OS) -pedantic `sh osflags $(TARGETOS) cflags` -I@TERMUX_PREFIX@/include
|
||||
|
||||
all: stateos $(CLIENT) $(SERVER)
|
||||
|
12
root-packages/iodine/002-fix-ifconfig-path.patch
Normal file
12
root-packages/iodine/002-fix-ifconfig-path.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr iodine-0.7.0/src/tun.c iodine-0.7.0.mod/src/tun.c
|
||||
--- iodine-0.7.0/src/tun.c 2014-06-16 23:28:43.000000000 +0300
|
||||
+++ iodine-0.7.0.mod/src/tun.c 2019-01-20 16:44:23.331442272 +0200
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef IFCONFIGPATH
|
||||
-#define IFCONFIGPATH "PATH=/sbin:/bin "
|
||||
+#define IFCONFIGPATH "PATH=@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets "
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS32
|
21
root-packages/iodine/003-no-systemd-selinux.patch
Normal file
21
root-packages/iodine/003-no-systemd-selinux.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -uNr iodine-0.7.0/src/osflags iodine-0.7.0.mod/src/osflags
|
||||
--- iodine-0.7.0/src/osflags 2014-06-16 23:28:43.000000000 +0300
|
||||
+++ iodine-0.7.0.mod/src/osflags 2019-05-02 14:52:08.768570062 +0300
|
||||
@@ -18,8 +18,6 @@
|
||||
;;
|
||||
Linux)
|
||||
FLAGS="";
|
||||
- [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux";
|
||||
- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon";
|
||||
echo $FLAGS;
|
||||
;;
|
||||
esac
|
||||
@@ -34,8 +32,6 @@
|
||||
;;
|
||||
Linux)
|
||||
FLAGS="-D_GNU_SOURCE"
|
||||
- [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON";
|
||||
- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD";
|
||||
echo $FLAGS;
|
||||
;;
|
||||
esac
|
21
root-packages/iodine/LICENSE.patch
Normal file
21
root-packages/iodine/LICENSE.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- /dev/null 2020-08-12 08:36:38.994597860 +0200
|
||||
+++ ./LICENSE 2020-08-12 21:37:55.799137487 +0200
|
||||
@@ -0,0 +1,18 @@
|
||||
+Copyright (c) 2006-2014 Erik Ekman <yarrick@kryo.se>, 2006-2009 Bjorn
|
||||
+Andersson <flex@kryo.se>. Also major contributions by Anne Bezemer.
|
||||
+
|
||||
+Permission to use, copy, modify, and distribute this software for any purpose
|
||||
+with or without fee is hereby granted, provided that the above copyright notice
|
||||
+and this permission notice appear in all copies.
|
||||
+
|
||||
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
+PERFORMANCE OF THIS SOFTWARE.
|
||||
+
|
||||
+
|
||||
+MD5 implementation by L. Peter Deutsch (license and source in src/md5.[ch])
|
||||
+Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
|
11
root-packages/iodine/build.sh
Normal file
11
root-packages/iodine/build.sh
Normal file
@ -0,0 +1,11 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://code.kryo.se/iodine
|
||||
TERMUX_PKG_DESCRIPTION="Tunnel IPv4 data through a DNS server"
|
||||
TERMUX_PKG_LICENSE="ISC"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.7.0
|
||||
TERMUX_PKG_REVISION=10
|
||||
TERMUX_PKG_SRCURL=http://code.kryo.se/iodine/iodine-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=ad2b40acf1421316ec15800dcde0f587ab31d7d6f891fa8b9967c4ded93c013e
|
||||
TERMUX_PKG_DEPENDS="net-tools, zlib"
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="prefix=$TERMUX_PREFIX"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
14
root-packages/ipset/build.sh
Normal file
14
root-packages/ipset/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://ipset.netfilter.org
|
||||
TERMUX_PKG_DESCRIPTION="Administration tool for kernel IP sets"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
|
||||
TERMUX_PKG_VERSION=7.6
|
||||
TERMUX_PKG_SRCURL=http://ipset.netfilter.org/ipset-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=0e7d44caa9c153d96a9b5f12644fbe35a632537a5a7f653792b72e53d9d5c2db
|
||||
TERMUX_PKG_DEPENDS="libmnl, libltdl"
|
||||
TERMUX_PKG_BREAKS="ipset-dev"
|
||||
TERMUX_PKG_REPLACES="ipset-dev"
|
||||
TERMUX_PKG_BUILD_DEPENDS="libtool"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--with-kmod=no
|
||||
"
|
9
root-packages/iw/build.sh
Normal file
9
root-packages/iw/build.sh
Normal file
@ -0,0 +1,9 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://wireless.wiki.kernel.org/en/users/documentation/iw
|
||||
TERMUX_PKG_DESCRIPTION="CLI configuration utility for wireless devices"
|
||||
TERMUX_PKG_LICENSE="ISC"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=5.16
|
||||
TERMUX_PKG_SRCURL=https://mirrors.edge.kernel.org/pub/software/network/iw/iw-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=4c44e42762f903f9094ba5a598998c800a97a62afd6fd31ec1e0a799e308659c
|
||||
TERMUX_PKG_DEPENDS="libnl"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
11
root-packages/libaio/Makefile.patch
Normal file
11
root-packages/libaio/Makefile.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../Makefile.orig 2018-12-10 13:16:30.152694737 +0100
|
||||
+++ ./Makefile 2018-12-10 13:17:15.086091432 +0100
|
||||
@@ -4,7 +4,7 @@
|
||||
TAG = $(NAME)-$(VERSION)
|
||||
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
|
||||
|
||||
-prefix=/usr
|
||||
+prefix ?= /usr
|
||||
includedir=$(prefix)/include
|
||||
libdir=$(prefix)/lib
|
||||
|
11
root-packages/libaio/build.sh
Normal file
11
root-packages/libaio/build.sh
Normal file
@ -0,0 +1,11 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://lse.sourceforge.net/io/aio.html
|
||||
TERMUX_PKG_DESCRIPTION="Linux kernel AIO access library"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.3.112
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=http://ftp.de.debian.org/debian/pool/main/liba/libaio/libaio_${TERMUX_PKG_VERSION}.orig.tar.xz
|
||||
TERMUX_PKG_SHA256=f69e5800425f4ea957426693ac09f9896bb993db5490fa021644454adcc72a32
|
||||
TERMUX_PKG_BREAKS="libaio-dev"
|
||||
TERMUX_PKG_REPLACES="libaio-dev"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
8
root-packages/libaio/src-Makefile.patch
Normal file
8
root-packages/libaio/src-Makefile.patch
Normal file
@ -0,0 +1,8 @@
|
||||
--- ../src-Makefile.orig 2018-12-10 13:17:32.262625152 +0100
|
||||
+++ ./src/Makefile 2018-12-10 13:17:36.358752414 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-prefix=/usr
|
||||
+prefix ?= /usr
|
||||
includedir=$(prefix)/include
|
||||
libdir=$(prefix)/lib
|
||||
|
13
root-packages/libccid/build.sh
Normal file
13
root-packages/libccid/build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://ccid.apdu.fr/
|
||||
TERMUX_PKG_DESCRIPTION="A generic USB CCID (Chip/Smart Card Interface Devices) driver and ICCD (Integrated Circuit(s) Card Devices)."
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.4.31
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://ccid.apdu.fr/files/ccid-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=6b48d7b6e4390e038d25630f8664fe81618ab00f232d6efbe0e3cc6df28ce8f7
|
||||
TERMUX_PKG_DEPENDS="libpcsclite, libusb, flex"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export LEXLIB=$TERMUX_PREFIX/lib/libfl.so
|
||||
}
|
26
root-packages/libdevmapper/build.sh
Normal file
26
root-packages/libdevmapper/build.sh
Normal file
@ -0,0 +1,26 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://sourceware.org/lvm2/
|
||||
TERMUX_PKG_DESCRIPTION="A device-mapper library from LVM2 package"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2.03.09
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${TERMUX_PKG_VERSION}.tgz
|
||||
TERMUX_PKG_SHA256=c03a8b8d5c03ba8ac54ebddf670ae0d086edac54a6577e8c50721a8e174eb975
|
||||
TERMUX_PKG_DEPENDS="libandroid-support, libaio, readline"
|
||||
TERMUX_PKG_BREAKS="libdevmapper-dev"
|
||||
TERMUX_PKG_REPLACES="libdevmapper-dev"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--enable-pkgconfig
|
||||
"
|
||||
|
||||
termux_step_make() {
|
||||
make -j"${TERMUX_MAKE_PROCESSES}" lib.device-mapper
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
cd libdm
|
||||
make install
|
||||
}
|
||||
|
12
root-packages/libdevmapper/replace-rindex.patch
Normal file
12
root-packages/libdevmapper/replace-rindex.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr LVM2.2.02.177/libdm/libdm-deptree.c LVM2.2.02.177.mod/libdm/libdm-deptree.c
|
||||
--- LVM2.2.02.177/libdm/libdm-deptree.c 2017-12-18 22:44:35.000000000 +0200
|
||||
+++ LVM2.2.02.177.mod/libdm/libdm-deptree.c 2018-05-26 13:44:29.530097826 +0300
|
||||
@@ -576,7 +576,7 @@
|
||||
default_uuid_prefix = dm_uuid_prefix();
|
||||
default_uuid_prefix_len = strlen(default_uuid_prefix);
|
||||
|
||||
- if (suffix_list && (suffix_position = rindex(uuid, '-'))) {
|
||||
+ if (suffix_list && (suffix_position = strrchr(uuid, '-'))) {
|
||||
while ((suffix = suffix_list[i++])) {
|
||||
if (strcmp(suffix_position + 1, suffix))
|
||||
continue;
|
3831
root-packages/libdevmapper/stack.patch
Normal file
3831
root-packages/libdevmapper/stack.patch
Normal file
File diff suppressed because it is too large
Load Diff
25
root-packages/libfuse2/build.sh
Normal file
25
root-packages/libfuse2/build.sh
Normal file
@ -0,0 +1,25 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/libfuse/libfuse
|
||||
TERMUX_PKG_DESCRIPTION="FUSE (Filesystem in Userspace) is an interface for userspace programs to export a filesystem to the Linux kernel"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1, GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=2.9.9
|
||||
TERMUX_PKG_SRCURL=https://github.com/libfuse/libfuse/archive/fuse-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=e57a24721177c3b3dd71cb9239ca46b4dee283db9388d48f7ccd256184982194
|
||||
TERMUX_PKG_DEPENDS="libiconv"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--disable-example
|
||||
--disable-mtab
|
||||
"
|
||||
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
etc/init.d
|
||||
etc/udev
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export MOUNT_FUSE_PATH=$TERMUX_PREFIX/bin
|
||||
export UDEV_RULES_PATH=$TERMUX_PREFIX/etc/udev/rules.d
|
||||
export INIT_D_PATH=$TERMUX_PREFIX/etc/init.d
|
||||
./makeconf.sh
|
||||
}
|
42
root-packages/libfuse2/fuse.c.patch
Normal file
42
root-packages/libfuse2/fuse.c.patch
Normal file
@ -0,0 +1,42 @@
|
||||
diff --git a/lib/fuse.c b/../fuse.c
|
||||
index d1d873a..c3ddf68 100644
|
||||
--- a/lib/fuse.c
|
||||
+++ b/../fuse.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/file.h>
|
||||
+#include <stdatomic.h>
|
||||
|
||||
#define FUSE_NODE_SLAB 1
|
||||
|
||||
@@ -153,6 +154,7 @@ struct fuse {
|
||||
struct list_head partial_slabs;
|
||||
struct list_head full_slabs;
|
||||
pthread_t prune_thread;
|
||||
+ atomic_flag cancel;
|
||||
};
|
||||
|
||||
struct lock {
|
||||
@@ -4637,9 +4639,12 @@ static void *fuse_prune_nodes(void *fuse)
|
||||
{
|
||||
struct fuse *f = fuse;
|
||||
int sleep_time;
|
||||
+ atomic_flag_clear(&f->cancel);
|
||||
|
||||
while(1) {
|
||||
sleep_time = fuse_clean_cache(f);
|
||||
+ if (atomic_flag_test_and_set(&f->cancel)) pthread_exit(NULL);
|
||||
+ atomic_flag_clear(&f->cancel);
|
||||
sleep(sleep_time);
|
||||
}
|
||||
return NULL;
|
||||
@@ -4657,7 +4662,7 @@ void fuse_stop_cleanup_thread(struct fuse *f)
|
||||
{
|
||||
if (lru_enabled(f)) {
|
||||
pthread_mutex_lock(&f->lock);
|
||||
- pthread_cancel(f->prune_thread);
|
||||
+ atomic_flag_test_and_set(&f->cancel);
|
||||
pthread_mutex_unlock(&f->lock);
|
||||
pthread_join(f->prune_thread, NULL);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user