From fe01d7985f33e69f5ccd825fdfd90a8fff03daf6 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 5 Apr 2022 10:34:36 +0200 Subject: [PATCH] community/jimtcl: backport fix for openssl3 needed for tests to pass upstream issue: https://github.com/msteveb/jimtcl/issues/207 --- community/jimtcl/APKBUILD | 2 ++ community/jimtcl/openssl3.patch | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 community/jimtcl/openssl3.patch diff --git a/community/jimtcl/APKBUILD b/community/jimtcl/APKBUILD index b99a05d4fc0..36262096572 100644 --- a/community/jimtcl/APKBUILD +++ b/community/jimtcl/APKBUILD @@ -20,6 +20,7 @@ subpackages="$pkgname-dbg $pkgname-readline $pkgname-sqlite3 $pkgname-dev $pkgna source="https://github.com/msteveb/jimtcl/archive/$pkgver/jimtcl-$pkgver.tar.gz tests-skip-exec2-3.2.patch tests-skip-socket.patch + openssl3.patch " prepare() { @@ -85,4 +86,5 @@ sha512sums=" 5f798b15fd32673e2e2769e25c4dfeee43696e5bbd2d3ec3fd2f312fa49da9ef057fb4de81a10d3812dc07fb2e40ed79924b024e537e064d3213b10e06a416b6 jimtcl-0.81.tar.gz 09afa356d5b8330bbb4444c319edb4fb4caae18747b924a3cb82cd7d9062566b6180b05e4938b9e33c3bf76acf2b28a9dbdedc10b9c241dcb99ff07828c4f507 tests-skip-exec2-3.2.patch cbc3f08d23cfe7ebd45e677a09e7178436e728a965ab7af44d6e27621049c1cdc82768c4e81397004be3486bf3f767684601ec28d3584ea14d3dde69ccdd8bdb tests-skip-socket.patch +b6fd377696af167317fbe3b54882ffa8abcd42aac86d4c87b7fa5c48d5eb7a463476ecbc79972c7ed35bb0b2245e57f62d93f40bd7118348d68287af55c58a83 openssl3.patch " diff --git a/community/jimtcl/openssl3.patch b/community/jimtcl/openssl3.patch new file mode 100644 index 00000000000..de62e8074bc --- /dev/null +++ b/community/jimtcl/openssl3.patch @@ -0,0 +1,33 @@ +From b0271cca8e335a1ebe4e3d6a8889bd4d7d5e30e6 Mon Sep 17 00:00:00 2001 +From: Steve Bennett +Date: Tue, 5 Apr 2022 08:30:39 +1000 +Subject: [PATCH] aio: ssl: Fix eof detection with openssl3 + +Detection of eof takes precedence over detection of error. +Fixes #207 + +Signed-off-by: Steve Bennett +--- + jim-aio.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/jim-aio.c b/jim-aio.c +index 684a1fdf..8315c350 100644 +--- a/jim-aio.c ++++ b/jim-aio.c +@@ -642,9 +642,12 @@ static void JimAioSetError(Jim_Interp *interp, Jim_Obj *name) + + static int JimCheckStreamError(Jim_Interp *interp, AioFile *af) + { +- int ret = af->fops->error(af); +- if (ret) { +- JimAioSetError(interp, af->filename); ++ int ret = 0; ++ if (!af->fops->eof(af)) { ++ ret = af->fops->error(af); ++ if (ret) { ++ JimAioSetError(interp, af->filename); ++ } + } + return ret; + }