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

jenkins_2.107.3_all.deb depends on java being installed but no longer has this explicit dependency

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • packaging
    • debian/ubuntu

      It seems that jenkins_2.107.3_all.deb no longer has an explicit dependency on default-jre-headless or java8-runtime-headless, which means jenkins installations are easily broken if "apt-get autoremove" is run (and it's generally good practice for debian/ubuntu admins to run this command periodically).

      jenkins_2.107.2_all.deb and earlier had the correct dependency.

      There is a comment on https://pkg.jenkins.io/debian/ which suggests that this is intentional:

      You will need to explicitly install a Java runtime environment, because Jenkins does not work with Java 9, this is the safest way to ensure your system ends properly configured. Adding an explicit dependency requirement on Java could force installation of undesired versions of the JVM. Check JENKINS-40689 for more details about Jenkins and Java 9 compatibility.

       ...but this seems wrong- the package should just depend on java8 packages specifically.

          [JENKINS-51253] jenkins_2.107.3_all.deb depends on java being installed but no longer has this explicit dependency

          Mostyn Bramley-Moore created issue -
          Mostyn Bramley-Moore made changes -
          Description Original: It seems that jenkins_2.107.3_all.deb no longer has an explicit dependency on default-jre-headless or java8-runtime-headless, which means jenkins installations are easily broken if "apt-get autoremove" is run (and it's generally good practice for debian/ubuntu admins to run this command periodically).

           

          jenkins_2.107.2_all.deb and earlier had the correct dependency.
          New: It seems that jenkins_2.107.3_all.deb no longer has an explicit dependency on default-jre-headless or java8-runtime-headless, which means jenkins installations are easily broken if "apt-get autoremove" is run (and it's generally good practice for debian/ubuntu admins to run this command periodically).

          jenkins_2.107.2_all.deb and earlier had the correct dependency.

          There is a comment on [https://pkg.jenkins.io/debian/] which suggests that this is intentional:

          {quote}
          You will need to explicitly install a Java runtime environment, *because Jenkins does not work with Java 9*, this is the safest way to ensure your system ends properly configured. Adding an explicit dependency requirement on Java could force installation of undesired versions of the JVM. Check JENKINS-40689 for more details about Jenkins and Java 9 compatibility.
          {quote}

           ...but this seems wrong- the package should just depend on java8 packages specifically.

          Oleg Nenashev added a comment -

          FYI danielbeck olivergondza kohsuke . Likely this is a regression due to the packaging issue

          Oleg Nenashev added a comment - FYI danielbeck olivergondza kohsuke . Likely this is a regression due to the packaging issue
          Oleg Nenashev made changes -
          Labels New: regression

          Am I correct to understand this does not affects updating users as long as they do not call apt-get autoremove and for new installs this will require users to install (correct) java versions manually?

          Oliver Gondža added a comment - Am I correct to understand this does not affects updating users as long as they do not call apt-get autoremove and for new installs this will require users to install (correct) java versions manually?

          olivergondza: correct.

          Mostyn Bramley-Moore added a comment - olivergondza : correct.

          Daniel Beck added a comment -

          Caused by https://github.com/jenkinsci/packaging/commit/f5efeb3309a1f17193e05442201eeff01fb51e5b#diff-385242a38c7d9464b1f85b37f1753721 for JENKINS-45287 which has long been used, just not for the 2.107 line until 2.107.3.

          If there's a sane way to specify "only Java 8", ideally in a vendor independent manner (e.g. work on Ubuntu or whoever else uses debs), then this should be trivial to fix.

          Daniel Beck added a comment - Caused by https://github.com/jenkinsci/packaging/commit/f5efeb3309a1f17193e05442201eeff01fb51e5b#diff-385242a38c7d9464b1f85b37f1753721 for JENKINS-45287 which has long been used, just not for the 2.107 line until 2.107.3. If there's a sane way to specify "only Java 8", ideally in a vendor independent manner (e.g. work on Ubuntu or whoever else uses debs), then this should be trivial to fix.

          These dependencies was removed:

          default-jre-headless (>= 2:1.8) | java8-runtime-headless
          

          How about adding back something like this?

          java8-runtime-headless | openjdk-8-jre-headless
          

          Though perhaps only java8-runtime-headless is required.

          Mostyn Bramley-Moore added a comment - These dependencies was removed: default -jre-headless (>= 2:1.8) | java8-runtime-headless How about adding back something like this? java8-runtime-headless | openjdk-8-jre-headless Though perhaps only java8-runtime-headless is required.

          Daniel Beck added a comment -

          mbmop Could you file a PR? CC svanoort who is the closest we have to a maintainer of packaging, I think.

          Daniel Beck added a comment - mbmop Could you file a PR? CC svanoort who is the closest we have to a maintainer of packaging, I think.

          Mostyn Bramley-Moore added a comment - Sure: https://github.com/jenkinsci/packaging/pull/107

            Unassigned Unassigned
            mbmop Mostyn Bramley-Moore
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: