mirror of
https://github.com/termux/termux-packages
synced 2024-06-19 02:57:07 +00:00
fix(main/boinc): disable /proc/stat check (#19967)
This commit is contained in:
parent
b24272d2b3
commit
d01fc04d50
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/_autosetup boinc.mod/_autosetup
|
--- a/_autosetup
|
||||||
--- boinc/_autosetup 2022-07-18 18:32:21.000000000 +0800
|
+++ b/_autosetup
|
||||||
+++ boinc.mod/_autosetup 2022-09-11 21:07:04.995844110 +0800
|
|
||||||
@@ -19,7 +19,7 @@
|
@@ -19,7 +19,7 @@
|
||||||
check_version()
|
check_version()
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,8 @@ TERMUX_PKG_MAINTAINER="@termux"
|
||||||
_MAJOR_VERSION=8
|
_MAJOR_VERSION=8
|
||||||
_MINOR_VERSION=0
|
_MINOR_VERSION=0
|
||||||
TERMUX_PKG_VERSION="8.0.1"
|
TERMUX_PKG_VERSION="8.0.1"
|
||||||
TERMUX_PKG_SRCURL=https://github.com/BOINC/boinc/archive/client_release/${_MAJOR_VERSION}.${_MINOR_VERSION}/${TERMUX_PKG_VERSION}.tar.gz
|
TERMUX_PKG_REVISION=1
|
||||||
|
TERMUX_PKG_SRCURL=https://github.com/BOINC/boinc/archive/refs/tags/client_release/${_MAJOR_VERSION}.${_MINOR_VERSION}/${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_SHA256=db808f95a99ba0f27674ad7ea0a5f8b9ae027aa0cb5cc58bd731051a6ec928b0
|
TERMUX_PKG_SHA256=db808f95a99ba0f27674ad7ea0a5f8b9ae027aa0cb5cc58bd731051a6ec928b0
|
||||||
TERMUX_PKG_DEPENDS="libandroid-execinfo, libandroid-shmem, libc++, libcurl, openssl, zlib"
|
TERMUX_PKG_DEPENDS="libandroid-execinfo, libandroid-shmem, libc++, libcurl, openssl, zlib"
|
||||||
TERMUX_PKG_NO_STATICSPLIT=true
|
TERMUX_PKG_NO_STATICSPLIT=true
|
||||||
|
@ -44,9 +45,10 @@ termux_pkg_auto_update() {
|
||||||
|
|
||||||
local major_version=$(echo "${latest_version}" | sed -E "s|([0-9]+).([0-9]+).([0-9]+)|\1|")
|
local major_version=$(echo "${latest_version}" | sed -E "s|([0-9]+).([0-9]+).([0-9]+)|\1|")
|
||||||
local minor_version=$(echo "${latest_version}" | sed -E "s|([0-9]+).([0-9]+).([0-9]+)|\2|")
|
local minor_version=$(echo "${latest_version}" | sed -E "s|([0-9]+).([0-9]+).([0-9]+)|\2|")
|
||||||
sed -i "${TERMUX_PKG_BUILDER_DIR}/build.sh" \
|
sed \
|
||||||
-e "s|^_MAJOR_VERSION=.*|_MAJOR_VERSION=${major_version}|" \
|
-e "s|^_MAJOR_VERSION=.*|_MAJOR_VERSION=${major_version}|" \
|
||||||
-e "s|^_MINOR_VERSION=.*|_MINOR_VERSION=${minor_version}|"
|
-e "s|^_MINOR_VERSION=.*|_MINOR_VERSION=${minor_version}|" \
|
||||||
|
-i "${TERMUX_PKG_BUILDER_DIR}/build.sh"
|
||||||
|
|
||||||
termux_pkg_upgrade_version "${latest_version}" --skip-version-check
|
termux_pkg_upgrade_version "${latest_version}" --skip-version-check
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/client/Makefile.am boinc.mod/client/Makefile.am
|
--- a/client/Makefile.am
|
||||||
--- boinc/client/Makefile.am 2022-07-18 18:32:21.000000000 +0800
|
+++ b/client/Makefile.am
|
||||||
+++ boinc.mod/client/Makefile.am 2022-09-11 21:07:05.043844110 +0800
|
|
||||||
@@ -139,12 +139,12 @@
|
@@ -139,12 +139,12 @@
|
||||||
|
|
||||||
boinc$(EXEEXT): boinc_client$(EXEEXT)
|
boinc$(EXEEXT): boinc_client$(EXEEXT)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/client/app_start.cpp boinc.mod/client/app_start.cpp
|
--- a/client/app_start.cpp
|
||||||
--- boinc/client/app_start.cpp 2022-07-18 18:32:21.000000000 +0800
|
+++ b/client/app_start.cpp
|
||||||
+++ boinc.mod/client/app_start.cpp 2022-09-11 21:07:05.075844110 +0800
|
|
||||||
@@ -81,6 +81,10 @@
|
@@ -81,6 +81,10 @@
|
||||||
|
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
|
@ -12,7 +11,7 @@ diff -uNr boinc/client/app_start.cpp boinc.mod/client/app_start.cpp
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Dynamically link to these functions at runtime;
|
// Dynamically link to these functions at runtime;
|
||||||
@@ -1117,6 +1121,49 @@
|
@@ -1125,6 +1129,49 @@
|
||||||
//
|
//
|
||||||
umask(2);
|
umask(2);
|
||||||
retval = execv(switcher_path, argv);
|
retval = execv(switcher_path, argv);
|
||||||
|
@ -62,7 +61,7 @@ diff -uNr boinc/client/app_start.cpp boinc.mod/client/app_start.cpp
|
||||||
} else {
|
} else {
|
||||||
argv[0] = buf;
|
argv[0] = buf;
|
||||||
parse_command_line(cmdline, argv+1);
|
parse_command_line(cmdline, argv+1);
|
||||||
@@ -1139,6 +1186,17 @@
|
@@ -1147,6 +1194,17 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/client/gui_rpc_server_ops.cpp boinc.mod/client/gui_rpc_server_ops.cpp
|
--- a/client/gui_rpc_server_ops.cpp
|
||||||
--- boinc/client/gui_rpc_server_ops.cpp 2022-07-18 18:32:21.000000000 +0800
|
+++ b/client/gui_rpc_server_ops.cpp
|
||||||
+++ boinc.mod/client/gui_rpc_server_ops.cpp 2022-09-11 21:07:05.111844109 +0800
|
|
||||||
@@ -415,6 +415,7 @@
|
@@ -415,6 +415,7 @@
|
||||||
safe_strcpy(gstate.host_info.os_name, hi.os_name);
|
safe_strcpy(gstate.host_info.os_name, hi.os_name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/client/hostinfo_network.cpp boinc.mod/client/hostinfo_network.cpp
|
--- a/client/hostinfo_network.cpp
|
||||||
--- boinc/client/hostinfo_network.cpp 2022-07-18 18:32:21.000000000 +0800
|
+++ b/client/hostinfo_network.cpp
|
||||||
+++ boinc.mod/client/hostinfo_network.cpp 2022-09-11 21:07:05.175844109 +0800
|
|
||||||
@@ -44,6 +44,10 @@
|
@@ -44,6 +44,10 @@
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,8 +11,8 @@ diff -uNr boinc/client/hostinfo_network.cpp boinc.mod/client/hostinfo_network.cp
|
||||||
#include "error_numbers.h"
|
#include "error_numbers.h"
|
||||||
#include "file_names.h"
|
#include "file_names.h"
|
||||||
#include "mac_address.h"
|
#include "mac_address.h"
|
||||||
@@ -58,17 +62,29 @@
|
@@ -79,17 +83,29 @@
|
||||||
#include "hostinfo.h"
|
#endif
|
||||||
|
|
||||||
// get domain name and IP address of this host
|
// get domain name and IP address of this host
|
||||||
-// Android: if domain_name is empty, set it to android_xxxxxxxx
|
-// Android: if domain_name is empty, set it to android_xxxxxxxx
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/client/hostinfo_unix.cpp boinc.mod/client/hostinfo_unix.cpp
|
--- a/client/hostinfo_unix.cpp
|
||||||
--- boinc/client/hostinfo_unix.cpp 2023-01-24 04:47:18.000000000 +0800
|
+++ b/client/hostinfo_unix.cpp
|
||||||
+++ boinc.mod/client/hostinfo_unix.cpp 2023-03-18 07:57:32.603993049 +0800
|
|
||||||
@@ -169,6 +169,16 @@
|
@@ -169,6 +169,16 @@
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,7 +17,7 @@ diff -uNr boinc/client/hostinfo_unix.cpp boinc.mod/client/hostinfo_unix.cpp
|
||||||
// Some OS define _SC_PAGE_SIZE instead of _SC_PAGESIZE
|
// Some OS define _SC_PAGE_SIZE instead of _SC_PAGESIZE
|
||||||
#if defined(_SC_PAGE_SIZE) && !defined(_SC_PAGESIZE)
|
#if defined(_SC_PAGE_SIZE) && !defined(_SC_PAGESIZE)
|
||||||
#define _SC_PAGESIZE _SC_PAGE_SIZE
|
#define _SC_PAGESIZE _SC_PAGE_SIZE
|
||||||
@@ -1499,7 +1509,12 @@
|
@@ -1505,7 +1515,12 @@
|
||||||
// return BOINC_SUCCESS if at least version could be found (extra_info may remain empty)
|
// return BOINC_SUCCESS if at least version could be found (extra_info may remain empty)
|
||||||
// return ERR_NOT_FOUND if ldd couldn't be opened or no version information was found
|
// return ERR_NOT_FOUND if ldd couldn't be opened or no version information was found
|
||||||
//
|
//
|
||||||
|
@ -32,7 +31,7 @@ diff -uNr boinc/client/hostinfo_unix.cpp boinc.mod/client/hostinfo_unix.cpp
|
||||||
int get_libc_version(string& version, string&) {
|
int get_libc_version(string& version, string&) {
|
||||||
version = string(gnu_get_libc_version());
|
version = string(gnu_get_libc_version());
|
||||||
return BOINC_SUCCESS;
|
return BOINC_SUCCESS;
|
||||||
@@ -1549,16 +1564,24 @@
|
@@ -1555,16 +1570,24 @@
|
||||||
#if HAVE_SYS_UTSNAME_H
|
#if HAVE_SYS_UTSNAME_H
|
||||||
struct utsname u;
|
struct utsname u;
|
||||||
uname(&u);
|
uname(&u);
|
||||||
|
@ -61,7 +60,7 @@ diff -uNr boinc/client/hostinfo_unix.cpp boinc.mod/client/hostinfo_unix.cpp
|
||||||
safe_strcpy(os_version, u.release);
|
safe_strcpy(os_version, u.release);
|
||||||
#endif
|
#endif
|
||||||
#ifdef _HPUX_SOURCE
|
#ifdef _HPUX_SOURCE
|
||||||
@@ -1711,7 +1734,7 @@
|
@@ -1717,7 +1740,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} tty_patterns[] = {
|
} tty_patterns[] = {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/client/scripts/Makefile.am boinc.mod/client/scripts/Makefile.am
|
--- a/client/scripts/Makefile.am
|
||||||
--- boinc/client/scripts/Makefile.am 2022-07-18 18:32:21.000000000 +0800
|
+++ b/client/scripts/Makefile.am
|
||||||
+++ boinc.mod/client/scripts/Makefile.am 2022-09-11 21:07:05.251844109 +0800
|
|
||||||
@@ -2,21 +2,21 @@
|
@@ -2,21 +2,21 @@
|
||||||
|
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
diff -uNr boinc/configure.ac boinc.mod/configure.ac
|
--- a/configure.ac
|
||||||
--- boinc/configure.ac 2022-07-18 18:32:21.000000000 +0800
|
+++ b/configure.ac
|
||||||
+++ boinc.mod/configure.ac 2022-09-11 21:07:05.287844109 +0800
|
@@ -1124,7 +1124,7 @@
|
||||||
@@ -1100,7 +1100,7 @@
|
|
||||||
AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null])
|
AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null])
|
||||||
dnl or OS2
|
dnl or OS2
|
||||||
AM_CONDITIONAL(OS_OS2, [echo $host_os | grep '^os2' > /dev/null])
|
AM_CONDITIONAL(OS_OS2, [echo $host_os | grep '^os2' > /dev/null])
|
||||||
|
@ -9,4 +8,4 @@ diff -uNr boinc/configure.ac boinc.mod/configure.ac
|
||||||
+AM_CONDITIONAL(OS_ARM_LINUX, [echo $host_alias | grep '^arm-linux-skip' > /dev/null])
|
+AM_CONDITIONAL(OS_ARM_LINUX, [echo $host_alias | grep '^arm-linux-skip' > /dev/null])
|
||||||
AM_CONDITIONAL(OS_ARMV6_LINUX, [echo $host_alias | grep '^armv6-linux' > /dev/null])
|
AM_CONDITIONAL(OS_ARMV6_LINUX, [echo $host_alias | grep '^armv6-linux' > /dev/null])
|
||||||
AM_CONDITIONAL(ANDROID, [test x"${ANDROID}" = xyes])
|
AM_CONDITIONAL(ANDROID, [test x"${ANDROID}" = xyes])
|
||||||
AM_CONDITIONAL(BUILD_WITH_VCPKG, [test "${enable_apps_vcpkg}" = yes])
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
diff -uNr boinc/lib/gui_rpc_client.cpp boinc.mod/lib/gui_rpc_client.cpp
|
--- a/lib/gui_rpc_client.cpp
|
||||||
--- boinc/lib/gui_rpc_client.cpp 2022-07-18 18:32:21.000000000 +0800
|
+++ b/lib/gui_rpc_client.cpp
|
||||||
+++ boinc.mod/lib/gui_rpc_client.cpp 2022-09-11 21:07:05.339844109 +0800
|
|
||||||
@@ -416,7 +416,7 @@
|
@@ -416,7 +416,7 @@
|
||||||
char msg_buf[1024];
|
char msg_buf[5120];
|
||||||
FILE* f = fopen(GUI_RPC_PASSWD_FILE, "r");
|
FILE* f = fopen(GUI_RPC_PASSWD_FILE, "r");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
-#if defined(__linux__)
|
-#if defined(__linux__)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
diff -uNr boinc/lib/prefs.cpp boinc.mod/lib/prefs.cpp
|
--- a/lib/prefs.cpp
|
||||||
--- boinc/lib/prefs.cpp 2022-07-18 18:32:21.000000000 +0800
|
+++ b/lib/prefs.cpp
|
||||||
+++ boinc.mod/lib/prefs.cpp 2022-09-11 21:07:05.387844109 +0800
|
@@ -224,7 +224,7 @@
|
||||||
@@ -221,7 +221,7 @@
|
|
||||||
max_bytes_sec_down = 0;
|
max_bytes_sec_down = 0;
|
||||||
max_bytes_sec_up = 0;
|
max_bytes_sec_up = 0;
|
||||||
max_ncpus = 0;
|
max_ncpus = 0;
|
||||||
|
|
14
packages/boinc/lib-procinfo_unix.cpp.patch
Normal file
14
packages/boinc/lib-procinfo_unix.cpp.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
--- a/lib/procinfo_unix.cpp
|
||||||
|
+++ b/lib/procinfo_unix.cpp
|
||||||
|
@@ -268,6 +268,11 @@
|
||||||
|
// see https://www.baeldung.com/linux/get-cpu-usage
|
||||||
|
//
|
||||||
|
double total_cpu_time() {
|
||||||
|
+#ifdef __ANDROID__
|
||||||
|
+// /proc/stat is inaccessible under modern Android
|
||||||
|
+// so always return 0 instead of spamming error
|
||||||
|
+ return 0;
|
||||||
|
+#endif
|
||||||
|
char buf[1024];
|
||||||
|
static FILE *f=NULL;
|
||||||
|
static double scale;
|
|
@ -1,6 +1,5 @@
|
||||||
diff -uNr boinc/lib/synch.cpp boinc.mod/lib/synch.cpp
|
--- a/lib/synch.cpp
|
||||||
--- boinc/lib/synch.cpp 2022-07-18 18:32:21.000000000 +0800
|
+++ b/lib/synch.cpp
|
||||||
+++ boinc.mod/lib/synch.cpp 2022-09-11 21:07:05.419844109 +0800
|
|
||||||
@@ -18,7 +18,7 @@
|
@@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// interfaces for accessing sempahores
|
// interfaces for accessing sempahores
|
||||||
|
|
Loading…
Reference in New Issue
Block a user