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

Fix for JENKINS-20879 breaks Solaris

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-client-plugin
    • Labels:
      None
    • Environment:
    • Similar Issues:

      Description

      The change introduced to fix JENKINS-20879 breaks Solaris 10.
      The "export" statement seems to be invalid with /bin/sh (bourne shell?)

      hudson.plugins.git.GitException: Command "<path>/bin/git -c core.askpass=true fetch --tags --progress git@<server>:<repo>.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
      stdout: 
      stderr: /var/tmp/ssh514785069231260392.sh: DISPLAY=:123.456: is not an identifier
      

      (Note that I've redacted a few bits of information in that error message.)

      The change that causes the issue:
      https://github.com/jenkinsci/git-client-plugin/commit/0e67e3d4003124d98db540b86f27d0c4d1347493

      #!/bin/sh
      [ -z "${DISPLAY}" ] && export DISPLAY=:123.456
      ssh -i "/var/tmp/ssh6798954629722663247key" -o StrictHostKeyChecking=no "$@"
      

      I've worked around this issue for the moment by setting DISPLAY=:99 on the affected slaves.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Thanks for the report. I forgot that not every platform aliases /bin/sh to /bin/bash. I suspect the same problem exists on some subset of AIX, hp-ux, FreeBSD, OpenBSD, and NetBSD.

          I don't have one of those machines in my test configurations, only Windows 7, Windows 8, Windows Home Server 2011, Debian 6, Debian 7, Debian 8, CentOS 6, CentOS 7, and Ubuntu 14.04. Time to add one of the BSD's to my test configuration...

          Show
          markewaite Mark Waite added a comment - Thanks for the report. I forgot that not every platform aliases /bin/sh to /bin/bash. I suspect the same problem exists on some subset of AIX, hp-ux, FreeBSD, OpenBSD, and NetBSD. I don't have one of those machines in my test configurations, only Windows 7, Windows 8, Windows Home Server 2011, Debian 6, Debian 7, Debian 8, CentOS 6, CentOS 7, and Ubuntu 14.04. Time to add one of the BSD's to my test configuration...
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java
          http://jenkins-ci.org/commit/git-client-plugin/4a4860187d41ddaa93791cfd631bb1f146c0b7b9
          Log:
          [Fix JENKINS-29813] Use Bourne shell rather than bash for ASKPASS answer

          Bourne shell does not allow a variable to be declared and exported
          with a single command. This uses a statement to declare and a
          statement to export.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java http://jenkins-ci.org/commit/git-client-plugin/4a4860187d41ddaa93791cfd631bb1f146c0b7b9 Log: [Fix JENKINS-29813] Use Bourne shell rather than bash for ASKPASS answer Bourne shell does not allow a variable to be declared and exported with a single command. This uses a statement to declare and a statement to export.
          Hide
          markewaite Mark Waite added a comment -

          Resolved in first git client plugin release after 1.18.0

          Show
          markewaite Mark Waite added a comment - Resolved in first git client plugin release after 1.18.0
          Hide
          runepeter Rune Peter Bjørnstad added a comment -

          Excellent! We have the same problem. Reverting to 1.17.1 works fine until a new release arrives.

          Show
          runepeter Rune Peter Bjørnstad added a comment - Excellent! We have the same problem. Reverting to 1.17.1 works fine until a new release arrives.
          Hide
          markewaite Mark Waite added a comment -

          If you're willing to help with testing a configuration I can't test (no access to a Solaris 10 machine), please download this build, run it on your system, and report the results.

          Show
          markewaite Mark Waite added a comment - If you're willing to help with testing a configuration I can't test (no access to a Solaris 10 machine), please download this build , run it on your system, and report the results.
          Hide
          markewaite Mark Waite added a comment -

          Included in git client plugin 1.19.0

          Show
          markewaite Mark Waite added a comment - Included in git client plugin 1.19.0

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              danagoyette Dana Goyette
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: