From f854c0ed9dcd2f85385b036fa333df0980efcb73 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 25 Nov 2022 22:19:11 +0100 Subject: gawk: update 5.1.1 -> 5.2.1 Place gawkbug into a separate package, as it includes target information which causes multilib conflicts. Adjust ptests so they are correctly executed: - unset LANG before starting - do not patch /usr/local/bin into /usr/bin; this is not correct (From OE-Core rev: b5422868b203ef69138406253946333f9928576e) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../gawk/gawk/remove-sensitive-tests.patch | 35 ++++++++--- meta/recipes-extended/gawk/gawk/run-ptest | 2 +- meta/recipes-extended/gawk/gawk_5.1.1.bb | 64 -------------------- meta/recipes-extended/gawk/gawk_5.2.1.bb | 69 ++++++++++++++++++++++ 4 files changed, 97 insertions(+), 73 deletions(-) delete mode 100644 meta/recipes-extended/gawk/gawk_5.1.1.bb create mode 100644 meta/recipes-extended/gawk/gawk_5.2.1.bb diff --git a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch b/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch index 167c0787ee..ffae55058b 100644 --- a/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch +++ b/meta/recipes-extended/gawk/gawk/remove-sensitive-tests.patch @@ -1,24 +1,43 @@ +From 354d24baf7c51977d22ff61ad42e6a2cbd4dc8ac Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Tue, 21 Dec 2021 17:09:12 +0000 +Subject: [PATCH] gawk: remove load-sensitive tests + These tests require an unloaded host as otherwise timing sensitive tests can fail https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371 Upstream-Status: Inappropriate Signed-off-by: Ross Burton ---- a/test/Maketests~ -+++ b/test/Maketests -@@ -2069,7 +2069,2 @@ +--- + test/Maketests | 10 ---------- + 1 file changed, 10 deletions(-) +diff --git a/test/Maketests b/test/Maketests +index 3a667af..f117697 100644 +--- a/test/Maketests ++++ b/test/Maketests +@@ -2137,11 +2137,6 @@ symtab12: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + -timeout: - @echo $@ $(ZOS_FAIL) -- @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - typedregex1: -@@ -2297,7 +2292,2 @@ + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +@@ -2371,11 +2366,6 @@ rwarray: + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ -- + -time: - @echo $@ -- @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ +- @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ - @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ - +- + mpfrbigint: + @echo $@ + @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk -M >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/meta/recipes-extended/gawk/gawk/run-ptest b/meta/recipes-extended/gawk/gawk/run-ptest index f67a95874f..2675650600 100644 --- a/meta/recipes-extended/gawk/gawk/run-ptest +++ b/meta/recipes-extended/gawk/gawk/run-ptest @@ -2,7 +2,7 @@ cd test for i in `grep -E "^[a-z0-9_-]*:$" Maketests |awk -F: '{print $1}'`; do - #LC_ALL=${GAWKLOCALE:-C} LANG=${GAWKLOCALE:-C} + unset LANG srcdir=`pwd` AWKPROG=gawk AWK=gawk CMP=cmp make -f Maketests $i >$i.tmp 2>&1 if [ -e _$i ]; then cat _$i diff --git a/meta/recipes-extended/gawk/gawk_5.1.1.bb b/meta/recipes-extended/gawk/gawk_5.1.1.bb deleted file mode 100644 index fe339805d0..0000000000 --- a/meta/recipes-extended/gawk/gawk_5.1.1.bb +++ /dev/null @@ -1,64 +0,0 @@ -SUMMARY = "GNU awk text processing utility" -DESCRIPTION = "The GNU version of awk, a text processing utility. \ -Awk interprets a special-purpose programming language to do \ -quick and easy text pattern matching and reformatting jobs." -HOMEPAGE = "https://www.gnu.org/software/gawk/" -BUGTRACKER = "bug-gawk@gnu.org" -SECTION = "console/utils" - -# gawk <= 3.1.5: GPL-2.0-only -# gawk >= 3.1.6: GPL-3.0-only -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -PACKAGECONFIG ??= "readline" -PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" -PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" - -SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ - file://remove-sensitive-tests.patch \ - file://run-ptest \ - " - -SRC_URI[sha256sum] = "6168d8d1dc8f74bd17d9dc22fa9634c49070f232343b744901da15fb4f06bffd" - -inherit autotools gettext texinfo update-alternatives - -FILES:${PN} += "${datadir}/awk" -FILES:${PN}-dev += "${libdir}/${BPN}/*.la" - -ALTERNATIVE:${PN} = "awk" -ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" -ALTERNATIVE_PRIORITY = "100" - -do_install:append() { - # remove the link since we don't package it - rm ${D}${bindir}/awk -} - -inherit ptest - -do_install_ptest() { - mkdir ${D}${PTEST_PATH}/test - ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk - # The list of tests is all targets in Maketests, apart from the dummy Gt-dummy - TESTS=$(awk -F: '$1 == "Gt-dummy" { next } /[[:alnum:]]+:$/ { print $1 }' ${S}/test/Maketests) - for i in $TESTS Maketests inclib.awk; do - cp ${S}/test/$i* ${D}${PTEST_PATH}/test - done - sed -i -e 's|/usr/local/bin|${bindir}|g' \ - -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk - - sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests - - # These tests require an unloaded host as otherwise timing sensitive tests can fail - # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371 - rm -f ${D}${PTEST_PATH}/test/time.* - rm -f ${D}${PTEST_PATH}/test/timeout.* -} - -RDEPENDS:${PN}-ptest += "make" - -RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-extended/gawk/gawk_5.2.1.bb b/meta/recipes-extended/gawk/gawk_5.2.1.bb new file mode 100644 index 0000000000..fbe6e7040b --- /dev/null +++ b/meta/recipes-extended/gawk/gawk_5.2.1.bb @@ -0,0 +1,69 @@ +SUMMARY = "GNU awk text processing utility" +DESCRIPTION = "The GNU version of awk, a text processing utility. \ +Awk interprets a special-purpose programming language to do \ +quick and easy text pattern matching and reformatting jobs." +HOMEPAGE = "https://www.gnu.org/software/gawk/" +BUGTRACKER = "bug-gawk@gnu.org" +SECTION = "console/utils" + +# gawk <= 3.1.5: GPL-2.0-only +# gawk >= 3.1.6: GPL-3.0-only +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +PACKAGECONFIG ??= "readline" +PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" +PACKAGECONFIG[mpfr] = "--with-mpfr,--without-mpfr, mpfr" + +SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ + file://remove-sensitive-tests.patch \ + file://run-ptest \ + " + +SRC_URI[sha256sum] = "529e7c8c6acf21ff3a6183f4d763c632810908989c24675c77995d51ac37b79c" + +inherit autotools gettext texinfo update-alternatives + +FILES:${PN} += "${datadir}/awk" +FILES:${PN}-dev += "${libdir}/${BPN}/*.la" + +PACKAGES =+ "${PN}-gawkbug" +FILES:${PN}-gawkbug += "${bindir}/gawkbug" + +ALTERNATIVE:${PN} = "awk" +ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" +ALTERNATIVE_PRIORITY = "100" + +do_install:append() { + # remove the link since we don't package it + rm ${D}${bindir}/awk + # Strip non-reproducible build flags (containing build paths) + sed -i -e 's|^CC.*|CC=""|g' -e 's|^CFLAGS.*|CFLAGS=""|g' ${D}${bindir}/gawkbug +} + +inherit ptest + +do_install_ptest() { + mkdir ${D}${PTEST_PATH}/test + ln -s ${bindir}/gawk ${D}${PTEST_PATH}/gawk + # The list of tests is all targets in Maketests, apart from the dummy Gt-dummy + TESTS=$(awk -F: '$1 == "Gt-dummy" { next } /[[:alnum:]]+:$/ { print $1 }' ${S}/test/Maketests) + for i in $TESTS Maketests inclib.awk; do + cp ${S}/test/$i* ${D}${PTEST_PATH}/test + done + sed -i \ + -e 's|#!${base_bindir}/awk|#!${bindir}/awk|g' ${D}${PTEST_PATH}/test/*.awk + + sed -i -e "s|GAWKLOCALE|LANG|g" ${D}${PTEST_PATH}/test/Maketests + + # These tests require an unloaded host as otherwise timing sensitive tests can fail + # https://bugzilla.yoctoproject.org/show_bug.cgi?id=14371 + rm -f ${D}${PTEST_PATH}/test/time.* + rm -f ${D}${PTEST_PATH}/test/timeout.* +} + +RDEPENDS:${PN}-ptest += "make" + +RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us.iso-8859-1" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf