From 5dc82d410692e34bb97afaca5fc228f2338aba94 Mon Sep 17 00:00:00 2001 From: George Matsumura Date: Tue, 17 Nov 2026 23:35:53 -0800 Subject: [PATCH] perl: fix race condition in multi-job build. Commit dd8d3f8cbc408173f6bc2b26ad2b1c596c2c2467 introduces a modification of config.sh at the end of the configure phase. This leads to config.h, which depends on config.sh, being rebuilt during the build phase. config.h is required for some targets that do not explicitly depend on config.h, leading to a race condition in which these other targets may be attempted to be built with a half-generated config.h during multi-job builds. Replace the previous sig_count fix with one that does not modify files at the end of the configure phase. --- srcpkgs/perl/patches/fix_sig_count.patch | 14 ++++++++++++++ srcpkgs/perl/template | 6 +----- 2 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/perl/patches/fix_sig_count.patch diff --git a/srcpkgs/perl/patches/fix_sig_count.patch b/srcpkgs/perl/patches/fix_sig_count.patch new file mode 100644 index 00000000000000..4362ca6a1f43d1 --- /dev/null +++ b/srcpkgs/perl/patches/fix_sig_count.patch @@ -0,0 +1,14 @@ +fixup wrong NSIG https://github.com/arsv/perl-cross/issues/168 + +diff -ruN perl-5.42.3_orig/cnf/configure_sigs.sh perl-5.42.3/cnf/configure_sigs.sh +--- perl-5.42.3_orig/cnf/configure_sigs.sh 2026-11-17 22:26:32.739369702 -0800 ++++ perl-5.42.3/cnf/configure_sigs.sh 2026-11-17 22:32:36.963959314 -0800 +@@ -53,7 +53,7 @@ + try_add 'configure check sig_count=NSIG' + try_dump + if try_preproc; then +- num=`grep 'configure check sig_count' try.out | sed -e 's/.*=//' -e 's/[^0-9]//g'` ++ num=$((`grep 'configure check sig_count' try.out | sed -e 's/.*=//'`)) + if [ -n "$num" ]; then + define sig_count "$num" + result "$num" diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template index 5b798769c9dac1..292a5580a7dd70 100644 --- a/srcpkgs/perl/template +++ b/srcpkgs/perl/template @@ -1,7 +1,7 @@ # Template file for 'perl' pkgname=perl version=5.42.3 -revision=1 +revision=2 _perl_cross_version=1.6.4 build_style=gnu-configure makedepends="zlib-devel bzip2-devel gdbm-devel db-devel" @@ -205,10 +205,6 @@ do_configure() { cat ./config.log return 42 } - - # fixup wrong NSIG https://github.com/arsv/perl-cross/issues/168 - sed -i -e "s/sig_count='641'/sig_count='65'/; - s/sig_count='1281'/sig_count='129'/" config.sh } do_check() {