From 5e655a0bf6eb8234ee57eec08e1b3ecf089b7606 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 25 Jul 2026 01:15:08 +0900 Subject: [PATCH] internal/rosa/package: gawk Reintroduce this to build strace without xz-compressed release tarball: bootstrap script explicitly requires gawk. Signed-off-by: Ophestra --- internal/rosa/package/gawk/broken-tests.patch | 35 +++++++++++++++++ internal/rosa/package/gawk/musl-errno.patch | 39 +++++++++++++++++++ internal/rosa/package/gawk/package.az | 26 +++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 internal/rosa/package/gawk/broken-tests.patch create mode 100644 internal/rosa/package/gawk/musl-errno.patch create mode 100644 internal/rosa/package/gawk/package.az diff --git a/internal/rosa/package/gawk/broken-tests.patch b/internal/rosa/package/gawk/broken-tests.patch new file mode 100644 index 00000000..400567f0 --- /dev/null +++ b/internal/rosa/package/gawk/broken-tests.patch @@ -0,0 +1,35 @@ +diff --git a/test/Makefile.am b/test/Makefile.am +index 88e15ef1f..bfc279fcb 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -1726,7 +1726,7 @@ LOCALE_CHARSET_TESTS = \ + SHLIB_TESTS = \ + apiterm filefuncs fnmatch fork fork2 fts functab4 functab5 \ + getfile indirectbuiltin2 inplace1 inplace2 inplace2bcomp inplace3 \ +- inplace3bcomp ordchr ordchr2 readall readdir readdir_retest \ ++ inplace3bcomp ordchr ordchr2 readall readdir_retest \ + readdir_test readfile readfile2 revout revtwoway rwarray \ + testext time + +diff --git a/test/Makefile.in b/test/Makefile.in +index 2d4eeaa5a..7930af8d5 100644 +--- a/test/Makefile.in ++++ b/test/Makefile.in +@@ -1986,7 +1986,7 @@ LOCALE_CHARSET_TESTS = \ + SHLIB_TESTS = \ + apiterm filefuncs fnmatch fork fork2 fts functab4 functab5 \ + getfile indirectbuiltin2 inplace1 inplace2 inplace2bcomp inplace3 \ +- inplace3bcomp ordchr ordchr2 readall readdir readdir_retest \ ++ inplace3bcomp ordchr ordchr2 readall readdir_retest \ + readdir_test readfile readfile2 revout revtwoway rwarray \ + testext time + +diff --git a/test/clos1way6.ok b/test/clos1way6.ok +index 5768617d3..be4d73e79 100644 +--- a/test/clos1way6.ok ++++ b/test/clos1way6.ok +@@ -1,3 +1,3 @@ + gawk: clos1way6.awk:5: warning: fflush: cannot flush: two-way pipe `cat - 1>&2; sleep 2' has closed write end +-test1 + Bad file descriptor ++test1 diff --git a/internal/rosa/package/gawk/musl-errno.patch b/internal/rosa/package/gawk/musl-errno.patch new file mode 100644 index 00000000..7949fec3 --- /dev/null +++ b/internal/rosa/package/gawk/musl-errno.patch @@ -0,0 +1,39 @@ +diff --git a/test/testext-mpfr.ok b/test/testext-mpfr.ok +index 6a5f98147..adf8685e2 100644 +--- a/test/testext-mpfr.ok ++++ b/test/testext-mpfr.ok +@@ -21,7 +21,7 @@ var_test: sym_update of ARGC failed - correctly + var_test: sym_update("testvar") succeeded + var_test() returned 1, test_var = 42 + +-test_errno() returned 1, ERRNO = No child processes ++test_errno() returned 1, ERRNO = No child process + + fubar = 9 + rumpus = -5 +diff --git a/test/testext.ok b/test/testext.ok +index 3e0c1328c..11d150fe3 100644 +--- a/test/testext.ok ++++ b/test/testext.ok +@@ -21,7 +21,7 @@ var_test: sym_update of ARGC failed - correctly + var_test: sym_update("testvar") succeeded + var_test() returned 1, test_var = 42 + +-test_errno() returned 1, ERRNO = No child processes ++test_errno() returned 1, ERRNO = No child process + + fubar = 9 + rumpus = -5 +diff --git a/vms/vmstest.com b/vms/vmstest.com +index a042764b1..c47984e38 100644 +--- a/vms/vmstest.com ++++ b/vms/vmstest.com +@@ -917,7 +917,7 @@ $ set noOn + $ AWKLIBPATH_dir + $ gawk -f _'test'.awk >_'test'.tmp 2>&1 + $ if .not. $status then call exit_code '$status' _'test'.tmp +-$ gawk "{gsub(""no children"",""No child processes"")}1" - ++$ gawk "{gsub(""no children"",""No child process"")}1" - + _'test'.tmp >_'test'.tmp1 + $ rm sys$disk:[]_'test'.tmp;* + $ mv sys$disk:[]_'test'.tmp1 sys$disk:[]_'test'.tmp diff --git a/internal/rosa/package/gawk/package.az b/internal/rosa/package/gawk/package.az new file mode 100644 index 00000000..310db083 --- /dev/null +++ b/internal/rosa/package/gawk/package.az @@ -0,0 +1,26 @@ +package gawk { + description = "an implementation of awk with GNU extensions"; + website = "https://www.gnu.org/software/gawk"; + anitya = 868; + + block = "regressions introduced in 5.4.1, "+ + "does not even pass its own test suite"; + + version# = "5.4.0"; + source = remoteTar { + url = "https://ftpmirror.gnu.org/gnu/gawk/gawk-"+version+".tar.gz"; + checksum = "m0RkIolC-PI7EY5q8pcx5Y-0twlIW0Yp3wXXmV-QaHorSdf8BhZ7kW9F8iWomz0C"; + compress = gzip; + }; + patches = [ + "musl-errno.patch", + "broken-tests.patch", + ]; + + exec = make {}; + + inputs = [ + diffutils, + util-linux, + ]; +}