From d08dc7d552236cf6906c86267ccb6c8fed3c522b Mon Sep 17 00:00:00 2001 From: Joachim Ansorg Date: Thu, 26 Nov 2026 11:53:40 +0100 Subject: [PATCH] Support Bash 5.0 through 5.3 and test them in CI configure now accepts Bash 5.0 and 5.1 in addition to 5.2 and 5.3. New GitHub Actions workflow runs the test suite in the official bash: Docker images. It runs on pushes and pull requests against bash-5.3, and on manual dispatch with a comma-separated list of versions (default 5.0,5.1,5.2,5.3). --- .github/workflows/bash-versions.yml | 41 +++++++++++++++++++++++++++++ configure.ac | 4 +-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/bash-versions.yml diff --git a/.github/workflows/bash-versions.yml b/.github/workflows/bash-versions.yml new file mode 100644 index 00000000..6e9f717a --- /dev/null +++ b/.github/workflows/bash-versions.yml @@ -0,0 +1,41 @@ +name: "Bash version compatibility" + +on: + push: + branches: [bash-5.3] + pull_request: + branches: [bash-5.3] + workflow_dispatch: + inputs: + bash_versions: + description: "Comma-separated Bash versions to test" + default: "5.0,5.1,5.2,5.3" + +jobs: + versions: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.matrix.outputs.matrix }} + steps: + - id: matrix + env: + VERSIONS: ${{ inputs.bash_versions || '5.0,5.1,5.2,5.3' }} + run: echo "matrix=$(jq -Rc 'split(",") | map(gsub("\\s"; "")) | map(select(. != "")) | unique' <<< "$VERSIONS")" >> "$GITHUB_OUTPUT" + + tests: + name: "Bash ${{ matrix.bash }}" + needs: versions + runs-on: ubuntu-latest + timeout-minutes: 15 + container: bash:${{ matrix.bash }} + strategy: + fail-fast: false + matrix: + bash: ${{ fromJSON(needs.versions.outputs.matrix) }} + steps: + - run: apk add build-base autoconf automake libtool texinfo git coreutils diffutils findutils grep sed gawk perl + - uses: actions/checkout@v7 + - run: bash ./autogen.sh --with-bash="$(command -v bash)" + - run: make -j3 check + env: + VERBOSE: 1 diff --git a/configure.ac b/configure.ac index 57886f70..f84d3a76 100644 --- a/configure.ac +++ b/configure.ac @@ -103,12 +103,12 @@ bash_version=`$SH_PROG --version` [bash_minor=`$SH_PROG -c 'echo ${BASH_VERSINFO[1]}'`] bash_5_or_greater=no case "${bash_major}.${bash_minor}" in - 'OK_BASH_VERS' | '5.2' ) + 'OK_BASH_VERS' | '5.2' | '5.1' | '5.0' ) bash_5_or_greater=yes ;; *) AC_MSG_WARN([You have Bash $bash_version installed.]) - AC_MSG_ERROR([This package is only known to work with Bash 5.2 or Bash 5.3]) + AC_MSG_ERROR([This package is only known to work with Bash 5.0 through 5.3]) ;; esac