Mon Sep 21 22:46:11 2020 UTC ()
p5-Coro: add patch that fixes stability issues on NetBSD 9+

For details, see
https://mail-index.netbsd.org/current-users/2020/09/21/msg039578.html

Remove test status comment, all tests pass now.

Bump PKGREVISION.


(wiz)
diff -r1.29 -r1.30 pkgsrc/devel/p5-Coro/Makefile
diff -r1.15 -r1.16 pkgsrc/devel/p5-Coro/distinfo
diff -r0 -r1.1 pkgsrc/devel/p5-Coro/patches/patch-Coro_libcoro_coro.c

cvs diff -r1.29 -r1.30 pkgsrc/devel/p5-Coro/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/p5-Coro/Makefile 2020/09/19 21:01:28 1.29
+++ pkgsrc/devel/p5-Coro/Makefile 2020/09/21 22:46:11 1.30
@@ -1,73 +1,25 @@ @@ -1,73 +1,25 @@
1# $NetBSD: Makefile,v 1.29 2020/09/19 21:01:28 wiz Exp $ 1# $NetBSD: Makefile,v 1.30 2020/09/21 22:46:11 wiz Exp $
2 2
3DISTNAME= Coro-6.57 3DISTNAME= Coro-6.57
4PKGNAME= p5-${DISTNAME} 4PKGNAME= p5-${DISTNAME}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= devel perl5 6CATEGORIES= devel perl5
7MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Coro/} 7MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Coro/}
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://metacpan.org/release/Coro 10HOMEPAGE= https://metacpan.org/release/Coro
11COMMENT= Perl module for threads 11COMMENT= Perl module for threads
12LICENSE= ${PERL5_LICENSE} 12LICENSE= ${PERL5_LICENSE}
13 13
14DEPENDS+= p5-Canary-Stability-[0-9]*:../../devel/p5-Canary-Stability 14DEPENDS+= p5-Canary-Stability-[0-9]*:../../devel/p5-Canary-Stability
15DEPENDS+= p5-common-sense-[0-9]*:../../devel/p5-common-sense 15DEPENDS+= p5-common-sense-[0-9]*:../../devel/p5-common-sense
16DEPENDS+= p5-AnyEvent-[0-9]*:../../devel/p5-AnyEvent 16DEPENDS+= p5-AnyEvent-[0-9]*:../../devel/p5-AnyEvent
17 17
18MAKE_JOBS_SAFE= no 
19PERL5_PACKLIST= auto/Coro/.packlist 18PERL5_PACKLIST= auto/Coro/.packlist
20REPLACE_PERL+= Coro/jit-amd64-unix.pl Coro/jit-x86-unix.pl 19REPLACE_PERL+= Coro/jit-amd64-unix.pl Coro/jit-x86-unix.pl
21 20
22.include "../../mk/bsd.prefs.mk" 21MAKE_ENV.NetBSD+= CORO_JIT=n
23 
24.if ${OPSYS} == "NetBSD" 
25MAKE_ENV+= CORO_JIT=n 
26.endif 
27 
28# test failures after turning off JIT on NetBSD are random, best run so far: 
29# as pf 6.57 
30# t/00_basic.t .......... ok  
31# t/01_process.t ........ ok  
32# t/02_channel.t ........ ok  
33# t/03_channel.t ........ Failed 9/10 subtests  
34# t/04_rwlock.t ......... ok  
35# t/05_specific.t ....... ok  
36# t/06_prio.t ........... Failed 8/10 subtests  
37# t/07_eval.t ........... ok  
38# t/08_join.t ........... ok  
39# t/10_bugs.t ........... ok  
40# t/11_deadlock.t ....... ok  
41# t/12_exit.t ........... Failed 2/5 subtests  
42# t/13_diewarn.t ........ All 7 subtests passed  
43# t/14_load.t ........... ok  
44# t/15_semaphore.t ...... Failed 6/6 subtests  
45# t/16_signal.t ......... ok  
46# t/17_rouse.t .......... ok  
47# t/18_winder.t ......... ok  
48# t/19_handle.t ......... ok  
49# t/20_mutual_cancel.t .. ok  
50# Test Summary Report 
51# ------------------- 
52# t/03_channel.t (Wstat: 139 Tests: 1 Failed: 0) 
53# Non-zero wait status: 139 
54# Parse errors: Bad plan. You planned 10 tests but ran 1. 
55# t/06_prio.t (Wstat: 139 Tests: 2 Failed: 0) 
56# Non-zero wait status: 139 
57# Parse errors: Bad plan. You planned 10 tests but ran 2. 
58# t/12_exit.t (Wstat: 0 Tests: 4 Failed: 1) 
59# Failed test: 5 
60# Parse errors: Tests out of sequence. Found (5) but expected (4) 
61# Bad plan. You planned 5 tests but ran 4. 
62# t/13_diewarn.t (Wstat: 139 Tests: 7 Failed: 0) 
63# Non-zero wait status: 139 
64# t/15_semaphore.t (Wstat: 139 Tests: 0 Failed: 0) 
65# Non-zero wait status: 139 
66# Parse errors: Bad plan. You planned 6 tests but ran 0. 
67# Files=20, Tests=182, 0 wallclock secs ( 0.04 usr 0.02 sys + 0.29 cusr 0.07 csys = 0.42 CPU) 
68# Result: FAIL 
69# Failed 5/20 test programs. 1/182 subtests failed. 
70 22
71.include "../../devel/p5-EV/buildlink3.mk" 23.include "../../devel/p5-EV/buildlink3.mk"
72.include "../../lang/perl5/module.mk" 24.include "../../lang/perl5/module.mk"
73.include "../../mk/bsd.pkg.mk" 25.include "../../mk/bsd.pkg.mk"

cvs diff -r1.15 -r1.16 pkgsrc/devel/p5-Coro/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/p5-Coro/distinfo 2020/09/03 17:02:20 1.15
+++ pkgsrc/devel/p5-Coro/distinfo 2020/09/21 22:46:11 1.16
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
1$NetBSD: distinfo,v 1.15 2020/09/03 17:02:20 wiz Exp $ 1$NetBSD: distinfo,v 1.16 2020/09/21 22:46:11 wiz Exp $
2 2
3SHA1 (Coro-6.57.tar.gz) = 1ff1c7aee5cd1c31fbc50c38ab86d0ab0930417d 3SHA1 (Coro-6.57.tar.gz) = 1ff1c7aee5cd1c31fbc50c38ab86d0ab0930417d
4RMD160 (Coro-6.57.tar.gz) = 2959ba3cf6938a6094af43ae4e8b05779602feec 4RMD160 (Coro-6.57.tar.gz) = 2959ba3cf6938a6094af43ae4e8b05779602feec
5SHA512 (Coro-6.57.tar.gz) = d5655c5df1d502c265b26e474f1423f9406029ce56254a92d78b51e14313f685575095e185758d743d78f3c74d758922ec57f714498cf982819c110d198d6f42 5SHA512 (Coro-6.57.tar.gz) = d5655c5df1d502c265b26e474f1423f9406029ce56254a92d78b51e14313f685575095e185758d743d78f3c74d758922ec57f714498cf982819c110d198d6f42
6Size (Coro-6.57.tar.gz) = 198128 bytes 6Size (Coro-6.57.tar.gz) = 198128 bytes
 7SHA1 (patch-Coro_libcoro_coro.c) = c8c807e6eb4ed79e3f4c5c2c7a657fc26580f3a4

File Added: pkgsrc/devel/p5-Coro/patches/patch-Coro_libcoro_coro.c
$NetBSD: patch-Coro_libcoro_coro.c,v 1.1 2020/09/21 22:46:11 wiz Exp $

Workaround for libpthread bug in NetBSD.

--- Coro/libcoro/coro.c.orig	2018-08-14 15:37:40.000000000 +0000
+++ Coro/libcoro/coro.c
@@ -578,6 +578,10 @@ coro_create (coro_context *ctx, coro_fun
       /* POSIX, not here */
       pthread_attr_setstacksize (&attr, (size_t)ssize);
 #else
+#ifdef __NetBSD__
+      /* workaround for a bug in libpthread; the guard size should be ignored, but isn't */
+      pthread_attr_setguardsize (&attr, 0);
+#endif
       pthread_attr_setstack (&attr, sptr, (size_t)ssize);
 #endif
       pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS);