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

Debian packaging should not be satisfied by Java 9

      The Debian package is the only one that still declares a Java dependency (https://github.com/jenkinsci/packaging/commit/188ffd36c2abd83ca9e572b6b1fb6d2f423685bc) but it declares ≥8.

      This can in some cases result in Java 9 installations when those appear to not work with Jenkins.

      If possible the dependency should be limited to exactly Java 8, or dropped altogether with corresponding explanation on the package listing page.

      Similarly, Java dependency documentation for Opensuse/Redhat should be reviewed to ensure we don't claim Java 9 compatibility.

          [JENKINS-45287] Debian packaging should not be satisfied by Java 9

          Daniel Beck created issue -

          Raul Arabaolaza added a comment - - edited

          What does it mean limited to exactly Java 8? The current package just ensures that a Java 8 or higher is installed, but you can also have Java 7, 9 or any other version installed and configured as the default for the machine. So, if I set the dependency on exactly Java 8 that only means that among my set of installed packages I must have java 8, but it does not ensure I do not have Java 9 also installed and configured. I can force to not have any other version of Java installed but that looks a bit too much to me. Why should jenkins prevent me to install any versions of java in my server as long as I have the right one for jenkins itself? So, I would recommend to:

          • Drop the package's dependency on Java 8 and update the docs accordingly.
          • Create a preinst script that checks if java 8 is the one configured for the jenkins user and print a warning or abort installation if not.

          WDYT danielbeck?

          Raul Arabaolaza added a comment - - edited What does it mean limited to exactly Java 8 ? The current package just ensures that a Java 8 or higher is installed, but you can also have Java 7, 9 or any other version installed and configured as the default for the machine. So, if I set the dependency on exactly Java 8 that only means that among my set of installed packages I must have java 8, but it does not ensure I do not have Java 9 also installed and configured. I can force to not have any other version of Java installed but that looks a bit too much to me. Why should jenkins prevent me to install any versions of java in my server as long as I have the right one for jenkins itself? So, I would recommend to: Drop the package's dependency on Java 8 and update the docs accordingly. Create a preinst script that checks if java 8 is the one configured for the jenkins user and print a warning or abort installation if not. WDYT danielbeck ?
          Raul Arabaolaza made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: Raul Arabaolaza [ rarabaolaza ]
          Raul Arabaolaza made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Daniel Beck added a comment -

          Java 8 or higher

          As Jenkins doesn't work with Java 9, this is just wrong. ≥8 should be =8. You can have others installed, but Jenkins doesn't have its dependencies satisfied if you only have 7 and 9. It needs 8.

          Daniel Beck added a comment - Java 8 or higher As Jenkins doesn't work with Java 9, this is just wrong. ≥8 should be =8. You can have others installed, but Jenkins doesn't have its dependencies satisfied if you only have 7 and 9. It needs 8.

          danielbeck My point is that =8 alone doesn't really guarantees the installed jenkins to work, changing the >= 8 to =8 is feasible but IMHO a half backed solution that needs to be complemented by a preinst script by the resons specified above.

          Raul Arabaolaza added a comment - danielbeck My point is that =8 alone doesn't really guarantees the installed jenkins to work, changing the >= 8 to =8 is feasible but IMHO a half backed solution that needs to be complemented by a preinst script by the resons specified above.

          Daniel Beck added a comment -

          Preinst might be a bit much; doesn't the service script look for a compatible JRE?

          Daniel Beck added a comment - Preinst might be a bit much; doesn't the service script look for a compatible JRE?

          I can not find anything like that on the debian init script It seems there are some checks in the case of RPM but I have not found anything in the debian one. Also to be sure I have installed the deb package in a machine with java 9 installed and configured as default and the service starts without problems and jenkins also does the same... see attached screenshot

          Raul Arabaolaza added a comment - I can not find anything like that on the debian init script It seems there are some checks in the case of RPM but I have not found anything in the debian one. Also to be sure I have installed the deb package in a machine with java 9 installed and configured as default and the service starts without problems and jenkins also does the same... see attached screenshot
          Raul Arabaolaza made changes -
          Attachment New: jenkins_java-9.png [ 38775 ]

          Daniel Beck added a comment -

          Right, the deb hardcodes /usr/bin/java via https://github.com/jenkinsci/packaging/blob/master/deb/build/debian/jenkins.default#L7 – not sure this is desirable.

          Happy to take your guidance on this, but I've seen multiple reports from people who got Java 9 installed through this dependency (I think on ubuntu 14.04 with custom repos? Not sure) and that should not be happening.

          Daniel Beck added a comment - Right, the deb hardcodes /usr/bin/java via https://github.com/jenkinsci/packaging/blob/master/deb/build/debian/jenkins.default#L7 – not sure this is desirable. Happy to take your guidance on this, but I've seen multiple reports from people who got Java 9 installed through this dependency (I think on ubuntu 14.04 with custom repos? Not sure) and that should not be happening.

            rarabaolaza Raul Arabaolaza
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: