forked from termux/termux-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/nguynkhn/termux-packages …
…into bear
- Loading branch information
Showing
641 changed files
with
6,110 additions
and
3,561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
78 changes: 78 additions & 0 deletions
78
disabled-packages/python3.11/0001-fix-hardcoded-paths.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- a/Lib/aifc.py | ||
+++ b/Lib/aifc.py | ||
@@ -920,7 +920,7 @@ | ||
if __name__ == '__main__': | ||
import sys | ||
if not sys.argv[1:]: | ||
- sys.argv.append('/usr/demos/data/audio/bach.aiff') | ||
+ sys.argv.append('@TERMUX_PREFIX@/demos/data/audio/bach.aiff') | ||
fn = sys.argv[1] | ||
with open(fn, 'r') as f: | ||
print("Reading", fn) | ||
--- a/Lib/mailcap.py | ||
+++ b/Lib/mailcap.py | ||
@@ -55,7 +55,8 @@ | ||
# Don't bother with getpwuid() | ||
home = '.' # Last resort | ||
mailcaps = [home + '/.mailcap', '/etc/mailcap', | ||
- '/usr/etc/mailcap', '/usr/local/etc/mailcap'] | ||
+ '/usr/etc/mailcap', '/usr/local/etc/mailcap', | ||
+ '@TERMUX_PREFIX@/etc/mailcap'] | ||
return mailcaps | ||
|
||
|
||
--- a/Lib/mimetypes.py | ||
+++ b/Lib/mimetypes.py | ||
@@ -49,6 +49,7 @@ | ||
"/usr/local/lib/netscape/mime.types", | ||
"/usr/local/etc/httpd/conf/mime.types", # Apache 1.2 | ||
"/usr/local/etc/mime.types", # Apache 1.3 | ||
+ "@TERMUX_PREFIX@/etc/mime.types", # Termux | ||
] | ||
|
||
inited = False | ||
--- a/Lib/posixpath.py | ||
+++ b/Lib/posixpath.py | ||
@@ -32,7 +32,7 @@ | ||
extsep = '.' | ||
sep = '/' | ||
pathsep = ':' | ||
-defpath = '/bin:/usr/bin' | ||
+defpath = '@TERMUX_PREFIX@/bin' | ||
altsep = None | ||
devnull = '/dev/null' | ||
|
||
--- a/Lib/uuid.py | ||
+++ b/Lib/uuid.py | ||
@@ -361,7 +361,6 @@ | ||
|
||
try: | ||
path_dirs = os.environ.get('PATH', os.defpath).split(os.pathsep) | ||
- path_dirs.extend(['/sbin', '/usr/sbin']) | ||
executable = shutil.which(command, path=os.pathsep.join(path_dirs)) | ||
if executable is None: | ||
return None | ||
--- a/Lib/subprocess.py | ||
+++ b/Lib/subprocess.py | ||
@@ -1389,9 +1389,7 @@ | ||
args = list(args) | ||
|
||
if shell: | ||
- # On Android the default shell is at '/system/bin/sh'. | ||
- unix_shell = ('/system/bin/sh' if | ||
- hasattr(sys, 'getandroidapilevel') else '/bin/sh') | ||
+ unix_shell = ('@TERMUX_PREFIX@/bin/sh') | ||
args = [unix_shell, "-c"] + args | ||
if executable: | ||
args[0] = executable | ||
--- a/Lib/tempfile.py | ||
+++ b/Lib/tempfile.py | ||
@@ -124,7 +124,7 @@ | ||
if _os.name == 'nt': | ||
dirlist.extend([ r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ]) | ||
else: | ||
- dirlist.extend([ '/tmp', '/var/tmp', '/usr/tmp' ]) | ||
+ dirlist.extend([ '@TERMUX_PREFIX@/tmp' ]) | ||
|
||
# As a last resort, the current directory. | ||
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- a/Lib/http/server.py | ||
+++ b/Lib/http/server.py | ||
@@ -1165,10 +1165,6 @@ | ||
return | ||
# Child | ||
try: | ||
- try: | ||
- os.setuid(nobody) | ||
- except OSError: | ||
- pass | ||
os.dup2(self.rfile.fileno(), 0) | ||
os.dup2(self.wfile.fileno(), 1) | ||
os.execve(scriptfile, args, env) | ||
--- a/Lib/smtpd.py | ||
+++ b/Lib/smtpd.py | ||
@@ -9,7 +9,8 @@ | ||
-n | ||
This program generally tries to setuid `nobody', unless this flag is | ||
set. The setuid call will fail if this program is not run as root (in | ||
- which case, use this flag). | ||
+ which case, use this flag). Ignored in Termux as no setuid done on this | ||
+ platform. | ||
|
||
--version | ||
-V | ||
@@ -863,7 +864,7 @@ | ||
|
||
|
||
class Options: | ||
- setuid = True | ||
+ setuid = False | ||
classname = 'PureProxy' | ||
size_limit = None | ||
enable_SMTPUTF8 = False |
31 changes: 31 additions & 0 deletions
31
disabled-packages/python3.11/0003-ctypes-util-use-llvm-tools.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
https://github.com/termux/termux-packages/issues/8478 | ||
|
||
--- a/Lib/ctypes/util.py | ||
+++ b/Lib/ctypes/util.py | ||
@@ -172,7 +172,7 @@ | ||
# assuming GNU binutils / ELF | ||
if not f: | ||
return None | ||
- objdump = shutil.which('objdump') | ||
+ objdump = shutil.which('llvm-objdump') | ||
if not objdump: | ||
# objdump is not available, give up | ||
return None | ||
@@ -209,7 +209,7 @@ | ||
expr = os.fsencode(expr) | ||
|
||
try: | ||
- proc = subprocess.Popen(('/sbin/ldconfig', '-r'), | ||
+ proc = subprocess.Popen(('@TERMUX_PREFIX@/bin/ldconfig', '-r'), | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.DEVNULL) | ||
except OSError: # E.g. command not found | ||
@@ -300,7 +300,7 @@ | ||
def _findLib_ld(name): | ||
# See issue #9998 for why this is needed | ||
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name) | ||
- cmd = ['ld', '-t'] | ||
+ cmd = ['ld.lld', '-t'] | ||
libpath = os.environ.get('LD_LIBRARY_PATH') | ||
if libpath: | ||
for d in libpath.split(':'): |
77 changes: 77 additions & 0 deletions
77
disabled-packages/python3.11/0004-impl-getprotobyname.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- a/Modules/socketmodule.c | ||
+++ b/Modules/socketmodule.c | ||
@@ -5373,17 +5373,74 @@ | ||
This only returns the protocol number, since the other info is | ||
already known or not useful (like the list of aliases). */ | ||
|
||
+#ifdef __ANDROID__ | ||
+struct protocol_name_and_number { | ||
+ char* name; | ||
+ int number; | ||
+}; | ||
+#endif | ||
+ | ||
/*ARGSUSED*/ | ||
static PyObject * | ||
socket_getprotobyname(PyObject *self, PyObject *args) | ||
{ | ||
+#ifdef __ANDROID__ | ||
+ /* http://git.musl-libc.org/cgit/musl/tree/src/network/proto.c */ | ||
+ static const struct protocol_name_and_number protocols[] = { | ||
+ {"ip", 0}, | ||
+ {"icmp", 1}, | ||
+ {"igmp", 2}, | ||
+ {"ggp", 3}, | ||
+ {"ipencap", 4}, | ||
+ {"st", 5}, | ||
+ {"tcp", 6}, | ||
+ {"egp", 8}, | ||
+ {"pup", 12}, | ||
+ {"udp", 17}, | ||
+ {"hmp", 20}, | ||
+ {"xns-idp", 22}, | ||
+ {"iso-tp4", 29}, | ||
+ {"xtp", 36}, | ||
+ {"ddp", 37}, | ||
+ {"idpr-cmtp", 38}, | ||
+ {"ipv6", 41}, | ||
+ {"ipv6-route", 43}, | ||
+ {"ipv6-frag", 44}, | ||
+ {"idrp", 45}, | ||
+ {"rsvp", 46}, | ||
+ {"gre", 47}, | ||
+ {"esp", 50}, | ||
+ {"ah", 51}, | ||
+ {"skip", 57}, | ||
+ {"ipv6-icmp", 58}, | ||
+ {"ipv6-nonxt", 59}, | ||
+ {"ipv6-opts", 60}, | ||
+ {"rspf", 73}, | ||
+ {"vmtp", 81}, | ||
+ {"ospf", 89}, | ||
+ {"ipip", 94}, | ||
+ {"encap", 98}, | ||
+ {"pim", 103}, | ||
+ {"raw", 255} | ||
+ }; | ||
+ int i; | ||
+#endif | ||
const char *name; | ||
struct protoent *sp; | ||
if (!PyArg_ParseTuple(args, "s:getprotobyname", &name)) | ||
return NULL; | ||
+#ifdef __ANDROID__ | ||
+ for (i = 0; i < sizeof(protocols) / sizeof(protocols[0]); i++) { | ||
+ if (strcmp(protocols[i].name, name) == 0) { | ||
+ return PyLong_FromLong((long) protocols[i].number); | ||
+ } | ||
+ } | ||
+ sp = NULL; | ||
+#else | ||
Py_BEGIN_ALLOW_THREADS | ||
sp = getprotobyname(name); | ||
Py_END_ALLOW_THREADS | ||
+#endif | ||
if (sp == NULL) { | ||
PyErr_SetString(PyExc_OSError, "protocol not found"); | ||
return NULL; |
Oops, something went wrong.