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

Broken Debian upgrades because postinst doesn't check for present group/user

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core

      Package upgrade from 1.559 to 1.560 on Debian systems fails with:

      dpkg: error processing jenkins (--configure):
      subprocess installed post-installation script returned error exit status 1

      due to the:

      addgroup --system --quiet jenkins

      call in postinst without checking whether corresponding group already exists.

      Problem introduced as of:

      commit 7216aab0d3f7215be7d71109936ad4b3aa0a583b
      Author: Peter Eisentraut <peter@eisentraut.org>
      Date: Sun Nov 3 08:12:17 2013 -0500
      debian: Use a configurable group for the Jenkins user
      Typical Debian practice is to have one equally-named group per system
      user. Make that for the jenkins user by default, but allow it to be
      overridden in /etc/default/jenkins, same as for the user name.

      This change also deleted the check for the existing Jenkins user (for whatever reason, but that's also broken).

      I'm working on a fix/PR right now.

          [JENKINS-22710] Broken Debian upgrades because postinst doesn't check for present group/user

          Code changed in jenkins
          User: Michael Prokop
          Path:
          debian/debian/jenkins.postinst
          http://jenkins-ci.org/commit/jenkins/1b706c194a44a4b49b6d8260fc8ded0a3f9fca06
          Log:
          Debian postinst: check for present user/group before adding them

          In git commit 7216aab0d the check for present user was removed
          and therefore upgrading the Debian package on existing Jenkins
          installations fails. Also the newly added code for adding a
          configurable Jenkins group is missing a check for a possibly
          already present Jenkins group.

          Closes: JENKINS-22710

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Prokop Path: debian/debian/jenkins.postinst http://jenkins-ci.org/commit/jenkins/1b706c194a44a4b49b6d8260fc8ded0a3f9fca06 Log: Debian postinst: check for present user/group before adding them In git commit 7216aab0d the check for present user was removed and therefore upgrading the Debian package on existing Jenkins installations fails. Also the newly added code for adding a configurable Jenkins group is missing a check for a possibly already present Jenkins group. Closes: JENKINS-22710

          Daniel Beck added a comment -

          Fix will be in 1.561.

          Michael: The bot picks up the status change only if you write something like [FIXED JENKINS-22710] as commit message.

          Daniel Beck added a comment - Fix will be in 1.561. Michael: The bot picks up the status change only if you write something like [FIXED JENKINS-22710] as commit message.

          David O'Dwyer added a comment -

          Can you confirm if this fix made it into 1.561?

          David O'Dwyer added a comment - Can you confirm if this fix made it into 1.561?

          Mathis Dirksen-Thedens added a comment - - edited

          This seems still broken in 1.561, the postinst script doesn't contain any checks for present groups or users.

          EDIT: Also verified that this is the case inside the .deb package and not only on my server.

          Mathis Dirksen-Thedens added a comment - - edited This seems still broken in 1.561, the postinst script doesn't contain any checks for present groups or users. EDIT: Also verified that this is the case inside the .deb package and not only on my server.

          We're also affected by the problem in 1.561

          Gabriel Falkenberg added a comment - We're also affected by the problem in 1.561

          Daniel Beck added a comment -

          Sorry about that. As you can now see from the changelog (upcoming changes), this'll only be fixed in 1.562.

          Daniel Beck added a comment - Sorry about that. As you can now see from the changelog (upcoming changes), this'll only be fixed in 1.562.

          Mads Nielsen added a comment -

          Still happening in 1.562:
          Ubutu 14.04 runnning in Virtualbox.

          dpkg: error processing package jenkins (--configure):
          subprocess installed post-installation script returned error exit status 1

          Mads Nielsen added a comment - Still happening in 1.562: Ubutu 14.04 runnning in Virtualbox. dpkg: error processing package jenkins (--configure): subprocess installed post-installation script returned error exit status 1

          Getting this with 1.563 in Ubuntu 14.04 LTS.

          Andrew Erickson added a comment - Getting this with 1.563 in Ubuntu 14.04 LTS.

          Getting this with 1.564 in Lubuntu 14.04 LTS.

          Brendan Holmes added a comment - Getting this with 1.564 in Lubuntu 14.04 LTS.

          Code changed in jenkins
          User: Michael Prokop
          Path:
          debian/jenkins.postinst
          http://jenkins-ci.org/commit/packaging/a1dad64020887cb53ab1ec6ca2d5077d4061786e
          Log:
          Debian postinst: check for present user/group before adding them

          In git commit 7216aab0d the check for present user was removed
          and therefore upgrading the Debian package on existing Jenkins
          installations fails. Also the newly added code for adding a
          configurable Jenkins group is missing a check for a possibly
          already present Jenkins group.

          Closes: JENKINS-22710

          Originally-From: jenkins-ci.org/commit/core/1b706c194a44a4b49b6d8260fc8ded0a3f9fca06

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Prokop Path: debian/jenkins.postinst http://jenkins-ci.org/commit/packaging/a1dad64020887cb53ab1ec6ca2d5077d4061786e Log: Debian postinst: check for present user/group before adding them In git commit 7216aab0d the check for present user was removed and therefore upgrading the Debian package on existing Jenkins installations fails. Also the newly added code for adding a configurable Jenkins group is missing a check for a possibly already present Jenkins group. Closes: JENKINS-22710 Originally-From: jenkins-ci.org/commit/core/1b706c194a44a4b49b6d8260fc8ded0a3f9fca06

            Unassigned Unassigned
            mika Michael Prokop
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: