cfengine: Bump to 3.22.0

This commit is contained in:
Tee KOBAYASHI 2023-07-05 07:12:30 +09:00 committed by xtkoba
parent e3c7fe9328
commit c1f28f2b57
2 changed files with 45 additions and 4 deletions

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://cfengine.com/
TERMUX_PKG_DESCRIPTION="CFEngine is a configuration management technology"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@craigcomstock"
TERMUX_PKG_VERSION=1:3.21.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=1:3.22.0
TERMUX_PKG_SRCURL=git+https://github.com/cfengine/core
TERMUX_PKG_SHA256=6b487e189b5ccf46409af470cd3d4928c128a3ab042d7980de4c3fc20a6e9a44
TERMUX_PKG_SHA256=70bc344ed09c512ae7a2a19bf1627b3ce38473d226a19db423d95908664018d5
# "-build[n]" suffix in tag name is not a part of version string.
_CFENGINE_GIT_TAG_SUFFIX=
TERMUX_PKG_GIT_BRANCH=${TERMUX_PKG_VERSION#*:}${_CFENGINE_GIT_TAG_SUFFIX}
@ -34,7 +33,7 @@ termux_step_post_get_source() {
: ${_CFENGINE_GIT_TAG_SUFFIX:=}
local _MASTERFILES_VERSION=${TERMUX_PKG_VERSION#*:}${_CFENGINE_GIT_TAG_SUFFIX}
local _MASTERFILES_SRCURL=https://github.com/cfengine/masterfiles/archive/${_MASTERFILES_VERSION}.zip
local _MASTERFILES_SHA256=12daf020acf2fe10623051711850af7658f007488a2dc9ab113fcd7eb199b5e7
local _MASTERFILES_SHA256=6cb9a639075f71898c1fffdbb841de5fbf60d12222db63fffca1d49615a944fd
local _MASTERFILES_FILE=${TERMUX_PKG_CACHEDIR}/masterfiles-${_MASTERFILES_VERSION}.zip
termux_download \
${_MASTERFILES_SRCURL} \

View File

@ -0,0 +1,42 @@
--- a/libpromises/evalfunction.c
+++ b/libpromises/evalfunction.c
@@ -8459,10 +8459,27 @@
FnCallResult result;
};
+#ifdef __ANDROID__
+#define PTHREAD_CANCELED ((void *)-1)
+static void ThreadSignalHandler(int signum)
+{
+ pthread_exit(PTHREAD_CANCELED);
+}
+#endif
+
static void *IsReadableThreadRoutine(void *data)
{
assert(data != NULL);
+#ifdef __ANDROID__
+ struct sigaction actions;
+ memset(&actions, 0, sizeof(actions));
+ sigemptyset(&actions.sa_mask);
+ actions.sa_flags = 0;
+ actions.sa_handler = ThreadSignalHandler;
+ sigaction(SIGUSR2, &actions, NULL);
+#endif
+
struct IsReadableThreadData *const thread_data = data;
// Give main thread time to call pthread_cond_timedwait(3)
@@ -8614,7 +8631,11 @@
"Read operation timed out, exceeded %ld seconds.", path,
timeout);
+#ifndef __ANDROID__
ret = pthread_cancel(thread_data.thread);
+#else
+ ret = pthread_kill(thread_data.thread, SIGUSR2);
+#endif
if (ret != 0)
{
Log(LOG_LEVEL_ERR, "Failed to cancel thread");