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

OS X: postinstall script interprets that all uid's are taken if uid 499 is taken

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The postinstall scipt has a line that checks for an available uid for the jenkins user and fails if no uid below 500 is found to be free. The problem is that the script only checks whether uid 499 is taken and if it is, then assumes that all other uid's below are also taken. This is not always the case.
      To recreate, create a user with uid 499 and afterwards attempt to install jenkins from the native osx installer. The error output can be found in /var/log/install.log. The offending lines of code can be found in https://github.com/kisielk/jenkins/blob/master/osx/scripts/postinstall-launchd-jenkins, and consists of:
      uid=$(dscl . -list /Users uid | sort -nrk 2 | awk '$2 < 500

      {print $2 + 1; exit 0}

      ')
      if [ $uid -eq 500 ]; then
      echo 'ERROR: All system uids are in use!'
      exit 1
      fi

      The issue would be fixed if these lines were changed to something more flexible.

      Workaround:
      Unpack the installer, find the postinstall script and manually set uid, then repack installer. See http://stackoverflow.com/a/29747480/584405

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            videre David Marmoy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: