From ff29e6eef8db3bf10b31042d406c6372bf228451 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 22:54:40 +0100 Subject: [PATCH 01/15] Create codeql.yml --- .github/workflows/codeql.yml | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..a39ba78d3 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,83 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "master", "0.10" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master", "0.10" ] + schedule: + - cron: '23 0 * * 5' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners + # Consider using larger runners for possible analysis time improvements. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'cpp', 'java', 'javascript', 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] + # Use only 'java' to analyze code written in Java, Kotlin or both + # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" From 3031f25df2ce65026f609c9c129c9f291e09b009 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:05:40 +0100 Subject: [PATCH 02/15] Switch to our normal build steps --- .github/workflows/codeql.yml | 88 +++++++++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 16 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a39ba78d3..69fc9cea3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,10 +4,6 @@ # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. # -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. # name: "CodeQL" @@ -44,6 +40,11 @@ jobs: # Use only 'java' to analyze code written in Java, Kotlin or both # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + configure-args: "--enable-ja-rule --enable-e133 --enable-unittests" + compiler: + CC: "/usr/bin/gcc" + CXX: "/usr/bin/g++" + pkg: "gcc g++" steps: - name: Checkout repository @@ -61,21 +62,76 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + #- name: Autobuild + # uses: github/codeql-action/autobuild@v2 - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh + - name: Get number of CPU cores + id: num-cpu-cores + # TODO(Perry): Parallelization causes GH Actions to hang -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} + # run: echo "NUM_CPU_CORES=$(grep -c processor /proc/cpuinfo)" >> $GITHUB_OUTPUT + run: echo "NUM_CPU_CORES=1" >> $GITHUB_OUTPUT + - name: Update package database + run: apt-get update -y + # See comments beginning at + # https://github.com/actions/runner/issues/763#issuecomment-1435474884 + # Without Git, actions/checkout@v3 will resort to REST and will not + # create a .git folder or .git.config. The Problem Matcher looks for + # .git/config to find where the root of the repo is, so it must be + # present. + - name: Install Git + run: apt-get -y install git + - uses: actions/checkout@v3 + - name: Install build tools + shell: bash + run: | + apt-get -y install adduser sudo pkg-config libtool autoconf \ + automake g++ bison flex make bash-completion dh-autoreconf \ + debhelper devscripts wget python3-full python3-pip + - name: Setup Python venv + shell: bash + run: | + python3 -m venv --system-site-packages ../venv + source ../venv/bin/activate + echo "PATH=$PATH" >> $GITHUB_ENV + - name: Install Python build tools + run: python3 -m pip install --no-input gcovr + - name: Install build dependencies + shell: bash + run: | + apt-get -y install libcppunit-dev uuid-dev libncurses5-dev \ + libmicrohttpd-dev protobuf-compiler python3-protobuf \ + libprotobuf-dev libprotoc-dev zlib1g-dev libftdi-dev \ + libusb-1.0-0-dev liblo-dev libavahi-client-dev python3-numpy \ + default-jdk-headless maven + - name: Install compiler + shell: bash + run: apt-get -y install ${{ matrix.compiler.pkg }} + - name: Set up build user # CredentialsTest cannot run as root + run: | + adduser --disabled-password --gecos "" builduser + chown -R builduser:builduser . + chown builduser:builduser .. + - name: Autoreconf + run: sudo --preserve-env -u builduser env "PATH=$PATH" autoreconf -i + - name: Set configure arguments + run: | + echo "GH_OLA_CONFIGURE_ARGS=${{ matrix.configure-args }}" >> $GITHUB_ENV + - name: Set additional Linux configure arguments + if: runner.os == 'Linux' + # Silence all deprecated declarations on Linux due to auto_ptr making the build log too long + run: | + echo "GH_OLA_CONFIGURE_ARGS=$GH_OLA_CONFIGURE_ARGS CPPFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV + - name: Print configure command + run: echo "./configure $GH_OLA_CONFIGURE_ARGS" + - name: Configure + run: sudo --preserve-env -u builduser env "PATH=$PATH" ./configure $GH_OLA_CONFIGURE_ARGS + - name: Make + run: sudo --preserve-env -u builduser env "PATH=$PATH" make -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} VERBOSE=1 + - name: Display structure of the built files + if: always() && env.ACTIONS_STEP_DEBUG == 'true' + run: ls -alR - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 From 391379a6aa803617789686fc0a7a73fa49f89d42 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:24:58 +0100 Subject: [PATCH 03/15] Try and fix the build matrix --- .github/workflows/codeql.yml | 38 ++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 69fc9cea3..1bb4f2d9e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -35,16 +35,34 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp', 'java', 'javascript', 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - configure-args: "--enable-ja-rule --enable-e133 --enable-unittests" - compiler: - CC: "/usr/bin/gcc" - CXX: "/usr/bin/g++" - pkg: "gcc g++" + include: + - language: "cpp" + configure-args: "--enable-ja-rule --enable-e133 --enable-unittests" + compiler: + CC: "/usr/bin/gcc" + CXX: "/usr/bin/g++" + pkg: "gcc g++" + - language: "java" + configure-args: "--enable-unittests --enable-java-libs" + compiler: + CC: "/usr/bin/gcc" + CXX: "/usr/bin/g++" + pkg: "gcc g++" + - language: "javascript" + configure-args: "--enable-unittests" + compiler: + CC: "/usr/bin/gcc" + CXX: "/usr/bin/g++" + pkg: "gcc g++" + - language: "python" + configure-args: "--enable-unittests --enable-rdm-tests" + compiler: + CC: "/usr/bin/gcc" + CXX: "/usr/bin/g++" + pkg: "gcc g++" + env: + CC: "${{ matrix.compiler.CC }}" + CXX: "${{ matrix.compiler.CXX }}" steps: - name: Checkout repository From abe6427078bb29d6b00d7855e9eef16a7e687e8c Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:26:21 +0100 Subject: [PATCH 04/15] Standardise the name --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1bb4f2d9e..4decf7358 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ on: jobs: analyze: - name: Analyze + name: "Analyze (${{ matrix.language }})" # Runner size impacts CodeQL analysis time. To learn more, please see: # - https://gh.io/recommended-hardware-resources-for-running-codeql # - https://gh.io/supported-runners-and-hardware-resources From 6c89ecbea6d72fd4de3b33ad74833ffe7cb5fb5f Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:28:55 +0100 Subject: [PATCH 05/15] Fix dependency permissions --- .github/workflows/codeql.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4decf7358..cede905c6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -99,12 +99,12 @@ jobs: # .git/config to find where the root of the repo is, so it must be # present. - name: Install Git - run: apt-get -y install git + run: sudo apt-get -y install git - uses: actions/checkout@v3 - name: Install build tools shell: bash run: | - apt-get -y install adduser sudo pkg-config libtool autoconf \ + sudo apt-get -y install adduser sudo pkg-config libtool autoconf \ automake g++ bison flex make bash-completion dh-autoreconf \ debhelper devscripts wget python3-full python3-pip - name: Setup Python venv @@ -118,14 +118,14 @@ jobs: - name: Install build dependencies shell: bash run: | - apt-get -y install libcppunit-dev uuid-dev libncurses5-dev \ + sudo apt-get -y install libcppunit-dev uuid-dev libncurses5-dev \ libmicrohttpd-dev protobuf-compiler python3-protobuf \ libprotobuf-dev libprotoc-dev zlib1g-dev libftdi-dev \ libusb-1.0-0-dev liblo-dev libavahi-client-dev python3-numpy \ default-jdk-headless maven - name: Install compiler shell: bash - run: apt-get -y install ${{ matrix.compiler.pkg }} + run: sudo apt-get -y install ${{ matrix.compiler.pkg }} - name: Set up build user # CredentialsTest cannot run as root run: | adduser --disabled-password --gecos "" builduser From fa59e27e385609d2c669d877a6067f64a8ac865e Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:33:19 +0100 Subject: [PATCH 06/15] Add another missing sudo --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index cede905c6..11e3e309a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -91,7 +91,7 @@ jobs: # run: echo "NUM_CPU_CORES=$(grep -c processor /proc/cpuinfo)" >> $GITHUB_OUTPUT run: echo "NUM_CPU_CORES=1" >> $GITHUB_OUTPUT - name: Update package database - run: apt-get update -y + run: sudo apt-get update -y # See comments beginning at # https://github.com/actions/runner/issues/763#issuecomment-1435474884 # Without Git, actions/checkout@v3 will resort to REST and will not From cf492a1cf605256fb16f5ae65ead07d80ee020b3 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:38:40 +0100 Subject: [PATCH 07/15] Fix more permission errors --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 11e3e309a..7595d6e82 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -128,9 +128,9 @@ jobs: run: sudo apt-get -y install ${{ matrix.compiler.pkg }} - name: Set up build user # CredentialsTest cannot run as root run: | - adduser --disabled-password --gecos "" builduser - chown -R builduser:builduser . - chown builduser:builduser .. + sudo adduser --disabled-password --gecos "" builduser + sudo chown -R builduser:builduser . + sudo chown builduser:builduser .. - name: Autoreconf run: sudo --preserve-env -u builduser env "PATH=$PATH" autoreconf -i - name: Set configure arguments From a5846592a07534e131807a11f17b83757feb3996 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sun, 16 Jul 2023 23:50:12 +0100 Subject: [PATCH 08/15] Better match our working build workflow --- .github/workflows/codeql.yml | 47 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7595d6e82..39467c1e0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,7 +25,8 @@ jobs: # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + runs-on: 'ubuntu-latest' + container: "debian:stable" timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} permissions: actions: read @@ -65,8 +66,22 @@ jobs: CXX: "${{ matrix.compiler.CXX }}" steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Get number of CPU cores + id: num-cpu-cores + # TODO(Perry): Parallelization causes GH Actions to hang -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} + # run: echo "NUM_CPU_CORES=$(grep -c processor /proc/cpuinfo)" >> $GITHUB_OUTPUT + run: echo "NUM_CPU_CORES=1" >> $GITHUB_OUTPUT + - name: Update package database + run: apt-get update -y + # See comments beginning at + # https://github.com/actions/runner/issues/763#issuecomment-1435474884 + # Without Git, actions/checkout@v3 will resort to REST and will not + # create a .git folder or .git.config. The Problem Matcher looks for + # .git/config to find where the root of the repo is, so it must be + # present. + - name: Install Git + run: apt-get -y install git + - uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL @@ -85,26 +100,10 @@ jobs: #- name: Autobuild # uses: github/codeql-action/autobuild@v2 - - name: Get number of CPU cores - id: num-cpu-cores - # TODO(Perry): Parallelization causes GH Actions to hang -j${{ steps.num-cpu-cores.outputs.NUM_CPU_CORES }} - # run: echo "NUM_CPU_CORES=$(grep -c processor /proc/cpuinfo)" >> $GITHUB_OUTPUT - run: echo "NUM_CPU_CORES=1" >> $GITHUB_OUTPUT - - name: Update package database - run: sudo apt-get update -y - # See comments beginning at - # https://github.com/actions/runner/issues/763#issuecomment-1435474884 - # Without Git, actions/checkout@v3 will resort to REST and will not - # create a .git folder or .git.config. The Problem Matcher looks for - # .git/config to find where the root of the repo is, so it must be - # present. - - name: Install Git - run: sudo apt-get -y install git - - uses: actions/checkout@v3 - name: Install build tools shell: bash run: | - sudo apt-get -y install adduser sudo pkg-config libtool autoconf \ + apt-get -y install adduser sudo pkg-config libtool autoconf \ automake g++ bison flex make bash-completion dh-autoreconf \ debhelper devscripts wget python3-full python3-pip - name: Setup Python venv @@ -125,12 +124,12 @@ jobs: default-jdk-headless maven - name: Install compiler shell: bash - run: sudo apt-get -y install ${{ matrix.compiler.pkg }} + run: apt-get -y install ${{ matrix.compiler.pkg }} - name: Set up build user # CredentialsTest cannot run as root run: | - sudo adduser --disabled-password --gecos "" builduser - sudo chown -R builduser:builduser . - sudo chown builduser:builduser .. + adduser --disabled-password --gecos "" builduser + chown -R builduser:builduser . + chown builduser:builduser .. - name: Autoreconf run: sudo --preserve-env -u builduser env "PATH=$PATH" autoreconf -i - name: Set configure arguments From e18dd09813daa3e8dc4d86460c846d5c6fa1b715 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 00:44:13 +0100 Subject: [PATCH 09/15] Check if their container behaviour is just really fussy... --- .github/workflows/codeql.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 39467c1e0..440464907 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,7 +26,8 @@ jobs: # - https://gh.io/using-larger-runners # Consider using larger runners for possible analysis time improvements. runs-on: 'ubuntu-latest' - container: "debian:stable" + container: + image: debian:stable timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} permissions: actions: read From 06937277d2b4be3650c9bc88a36fa4529316647c Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 06:35:57 +0100 Subject: [PATCH 10/15] Add debugging of Maven version checking --- config/maven.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/maven.m4 b/config/maven.m4 index 3b524a6c1..44c728ed2 100644 --- a/config/maven.m4 +++ b/config/maven.m4 @@ -26,6 +26,7 @@ if test -z "$MAVEN" ; then AC_MSG_ERROR([cannot find 'mvn' program, you need to install Maven]); elif test -n "$1" ; then AC_MSG_CHECKING([mvn version]) + set -x [maven_version=`$MAVEN --version 2> /dev/null | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] @@ -48,5 +49,6 @@ elif test -n "$1" ; then else AC_MSG_ERROR([mvn version too old $mavaen_version < $required]); fi + set +x fi ]) From 2a7b109e10c8ac0d48f32ae040eedf8a1318a8b4 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 06:45:45 +0100 Subject: [PATCH 11/15] Try fixing maven stderr redirection --- config/maven.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/maven.m4 b/config/maven.m4 index 44c728ed2..ab7929646 100644 --- a/config/maven.m4 +++ b/config/maven.m4 @@ -27,7 +27,7 @@ if test -z "$MAVEN" ; then elif test -n "$1" ; then AC_MSG_CHECKING([mvn version]) set -x - [maven_version=`$MAVEN --version 2> /dev/null | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] + [maven_version=`$MAVEN --version 2>/dev/null | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] [required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] From a61549079da2ee5fc90a4d58794f77b527aea58e Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 06:58:31 +0100 Subject: [PATCH 12/15] Make sure we exclude any irrelevant lines when fetching Maven version --- config/maven.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/maven.m4 b/config/maven.m4 index ab7929646..ad94d53f4 100644 --- a/config/maven.m4 +++ b/config/maven.m4 @@ -27,7 +27,7 @@ if test -z "$MAVEN" ; then elif test -n "$1" ; then AC_MSG_CHECKING([mvn version]) set -x - [maven_version=`$MAVEN --version 2>/dev/null | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] + [maven_version=`$MAVEN --version 2>/dev/null | grep -i 'Maven' | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] [required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] From aea4db73dc67d45806d89e79114e09df63d80a20 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 11:29:48 +0100 Subject: [PATCH 13/15] Bump the Java build versions --- java/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index 8171a1087..9d5e36eb8 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -11,8 +11,8 @@ maven-compiler-plugin 2.5.1 - 1.5 - 1.5 + 1.7 + 1.7 From 2e5d0f05593a46e0b146968e8ecabd52844fb76d Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 12:07:21 +0100 Subject: [PATCH 14/15] Bump the Protobuf Java version to match what Debian stable has Untested... --- java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/pom.xml b/java/pom.xml index 9d5e36eb8..f9f4b9ab8 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -31,7 +31,7 @@ com.google.protobuf protobuf-java - 2.6.1 + 3.21.12 junit From e47f79cd52c8a195a7b058edbae3c121bcb09456 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 17 Jul 2023 12:23:12 +0100 Subject: [PATCH 15/15] Bump the other Java pom dependencies --- java/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/pom.xml b/java/pom.xml index f9f4b9ab8..4626fa1fc 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -9,7 +9,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.11.0 1.7 1.7 @@ -18,7 +18,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 3.1.2 **/OlaClientTest.java @@ -36,7 +36,7 @@ junit junit - 4.8.2 + 4.13.2 test