diff --git a/.github/workflows/GnuTests.yml b/.github/workflows/GnuTests.yml index 1feb49677da..f82bbcabdba 100644 --- a/.github/workflows/GnuTests.yml +++ b/.github/workflows/GnuTests.yml @@ -29,7 +29,6 @@ env: TEST_ROOT_FULL_SUMMARY_FILE: 'gnu-root-full-result.json' TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json' TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json' - REPO_GNU_REF: "v9.8" jobs: native: @@ -42,6 +41,16 @@ jobs: with: path: 'uutils' persist-credentials: false + - name: Extract GNU version from build-gnu.sh + id: gnu-version + run: | + GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2) + if [ -z "$GNU_VERSION" ]; then + echo "Error: Failed to extract GNU version from build-gnu.sh" + exit 1 + fi + echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV + echo "Extracted GNU version: ${GNU_VERSION}" - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -164,6 +173,16 @@ jobs: with: path: 'uutils' persist-credentials: false + - name: Extract GNU version from build-gnu.sh + id: gnu-version-selinux + run: | + GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2) + if [ -z "$GNU_VERSION" ]; then + echo "Error: Failed to extract GNU version from build-gnu.sh" + exit 1 + fi + echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV + echo "Extracted GNU version: ${GNU_VERSION}" - uses: dtolnay/rust-toolchain@master with: toolchain: stable diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 734088252f4..aeaceda0e09 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -70,7 +70,7 @@ fi ### -release_tag_GNU="v9.8" +release_tag_GNU="v9.9" # check if the GNU coreutils has been cloned, if not print instructions # note: the ${path_GNU} might already exist, so we check for the .git directory @@ -309,10 +309,10 @@ sed -i -e "s/ginstall: creating directory/install: creating directory/g" tests/i # GNU doesn't support padding < -LONG_MAX # disable this test case # Use GNU sed because option -z is not available on BSD sed -"${SED}" -i -Ez "s/\n([^\n#]*pad-3\.2[^\n]*)\n([^\n]*)\n([^\n]*)/\n# uutils\/numfmt supports padding = LONG_MIN\n#\1\n#\2\n#\3/" tests/misc/numfmt.pl +"${SED}" -i -Ez "s/\n([^\n#]*pad-3\.2[^\n]*)\n([^\n]*)\n([^\n]*)/\n# uutils\/numfmt supports padding = LONG_MIN\n#\1\n#\2\n#\3/" tests/numfmt/numfmt.pl # Update the GNU error message to match the one generated by clap -sed -i -e "s/\$prog: multiple field specifications/error: the argument '--field ' cannot be used multiple times\n\nUsage: numfmt [OPTION]... [NUMBER]...\n\nFor more information, try '--help'./g" tests/misc/numfmt.pl +sed -i -e "s/\$prog: multiple field specifications/error: the argument '--field ' cannot be used multiple times\n\nUsage: numfmt [OPTION]... [NUMBER]...\n\nFor more information, try '--help'./g" tests/numfmt/numfmt.pl sed -i -e "s/Try 'mv --help' for more information/For more information, try '--help'/g" -e "s/mv: missing file operand/error: the following required arguments were not provided:\n ...\n\nUsage: mv [OPTION]... [-T] SOURCE DEST\n mv [OPTION]... SOURCE... DIRECTORY\n mv [OPTION]... -t DIRECTORY SOURCE...\n/g" -e "s/mv: missing destination file operand after 'no-file'/error: The argument '...' requires at least 2 values, but only 1 was provided\n\nUsage: mv [OPTION]... [-T] SOURCE DEST\n mv [OPTION]... SOURCE... DIRECTORY\n mv [OPTION]... -t DIRECTORY SOURCE...\n/g" tests/mv/diag.sh # our error message is better diff --git a/util/why-error.md b/util/why-error.md index 0fdff867a97..ac1e10ce62b 100644 --- a/util/why-error.md +++ b/util/why-error.md @@ -26,7 +26,7 @@ This file documents why some tests are failing: * gnu/tests/misc/close-stdout.sh * gnu/tests/misc/comm.pl * gnu/tests/misc/nohup.sh -* gnu/tests/misc/numfmt.pl - https://github.com/uutils/coreutils/issues/7219 / https://github.com/uutils/coreutils/issues/7221 +* gnu/tests/numfmt/numfmt.pl - https://github.com/uutils/coreutils/issues/7219 / https://github.com/uutils/coreutils/issues/7221 * gnu/tests/misc/stdbuf.sh - https://github.com/uutils/coreutils/issues/7072 * gnu/tests/misc/tee.sh - https://github.com/uutils/coreutils/issues/7073 * gnu/tests/misc/time-style.sh