Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64212

Debian/Ubuntu installer fails with OpenJDK 11.0.9.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: packaging
    • Labels:
      None
    • Environment:
      Ubuntu 20.04, openjdk 11.0.9.1, Jenkins 2.249.3
    • Similar Issues:
    • Released As:
      Jenkins core 2.263.1

      Description

      Jenkins fails to find a valid openjdk version on Ubuntu 20.04 when the version of openjdk includes more than three dots such as 11.0.9.1. 

      The sed regex used in the init script needs to be updated to more accurately match the version string.

       

      This is similar to bug JENKINS-57096

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment -

            Included in weekly release Jenkins 2.268. Will be included in LTS release Jenkins 2.263.1.

            Show
            markewaite Mark Waite added a comment - Included in weekly release Jenkins 2.268. Will be included in LTS release Jenkins 2.263.1.
            Hide
            proski Pavel Roskin added a comment -

            This is working for me:

            JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\([^.]*\)\.\([^.]*\)\..*".*/\1\2/p;')
            

            I replaced "." (any symbol) with "[^.]" (not a period) in two places, it was apparently the intention to match numbers, not periods, and it only worked by accident for shorter version numbers.

            Show
            proski Pavel Roskin added a comment - This is working for me: JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\([^.]*\)\.\([^.]*\)\..*" .*/\1\2/p;' ) I replaced "." (any symbol) with " [^.] " (not a period) in two places, it was apparently the intention to match numbers, not periods, and it only worked by accident for shorter version numbers.
            Hide
            tam116 Tyler Maclean added a comment -

            I've made a pull request with a proposed fix at https://github.com/jenkinsci/packaging/pull/198

            Show
            tam116 Tyler Maclean added a comment - I've made a pull request with a proposed fix at https://github.com/jenkinsci/packaging/pull/198

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tam116 Tyler Maclean
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: