Debian package postinst script does not support group names with spaces

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Component/s: packaging
    • None

      /etc/default/jenkins contains:

      JENKINS_USER=svc-jenkins
      JENKINS_GROUP="domain users"

      Running apt-get dist-upgrade results in:

      Setting up jenkins (2.170) ...
      chown: invalid group: 'svc-jenkins:domain'
      dpkg: error processing package jenkins (--configure):
      subprocess installed post-installation script returned error exit status 1
      Errors were encountered while processing:
      jenkins
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      Changing line 53 in jenkins.postinst from

      chown $JENKINS_USER:$JENKINS_GROUP /var/lib/jenkins /var/log/jenkins

      to

      chown "$JENKINS_USER":"$JENKINS_GROUP" /var/lib/jenkins /var/log/jenkins

      (and performing the same type of change on line 59 and 65 as well), resolves this issue.

            Assignee:
            Basil Crow
            Reporter:
            Tom Laermans
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: