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

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            tonimueller Toni Müller added a comment - - edited

            If you depend on java8-runtime-headless, than that's obviously too general. Therefore I suggested depending on openjdk-8-jre-headless for Debian/Stretch (don't know about Ubuntu), which will be OpenJDK 8 only, no other version. If you also want to accommodate other editions of Java, I don't know what to do, but I consider OpenJDK the go-to edition of Java on Debian. You then should not need to conflict with anything, just make sure you pick up the right version of Java if several versions are installed.

            I just checked, and it looks as if openjdk-8-jre-headless is still also in unstable, which would allow for this version being installed on the next version of Debian unless someone pulls it (but I don't see why). In future versions of Debian after Buster, it is at some point to be expected that they will only ship higher versions of OpenJDK, so at that point, which is several years in the future, Jenkins should run on, say, OpenJDK 11. 

            Show
            tonimueller Toni Müller added a comment - - edited If you depend on java8-runtime-headless, than that's obviously too general. Therefore I suggested depending on openjdk-8-jre-headless for Debian/Stretch (don't know about Ubuntu), which will be OpenJDK 8 only, no other version . If you also want to accommodate other editions of Java, I don't know what to do, but I consider OpenJDK the go-to edition of Java on Debian. You then should not need to conflict with anything, just make sure you pick up the right version of Java if several versions are installed. I just checked, and it looks as if openjdk-8-jre-headless is still also in unstable, which would allow for this version being installed on the next version of Debian unless someone pulls it (but I don't see why). In future versions of Debian after Buster, it is at some point to be expected that they will only ship higher versions of OpenJDK, so at that point, which is several years in the future, Jenkins should run on, say, OpenJDK 11. 
            Hide
            mbmop Mostyn Bramley-Moore added a comment -

            Then how about we depend upon "openjdk-8-jre-headless | <a similar version-specific oracle jre>" ?

            Show
            mbmop Mostyn Bramley-Moore added a comment - Then how about we depend upon "openjdk-8-jre-headless | <a similar version-specific oracle jre>" ?
            Hide
            tonimueller Toni Müller added a comment -

            That should imho do the trick for Debian Stretch and Buster, as far as I can see at the moment, and for Jessie users if they have backports enabled. If you can depend on 

            openjdk-8-jre-headless | openjdk-7-jre-headless | <similar oracle stuff>

            then you would cover all Debian versions back to Wheezy. But I don't know if Jenkins runs on OpenJDK 7. And, as said, I don't know what to depend on for Ubuntu & friends, although it might well be the very same stuff.

            Show
            tonimueller Toni Müller added a comment - That should imho do the trick for Debian Stretch and Buster, as far as I can see at the moment, and for Jessie users if they have backports enabled. If you can depend on  openjdk-8-jre-headless | openjdk-7-jre-headless | <similar oracle stuff> then you would cover all Debian versions back to Wheezy. But I don't know if Jenkins runs on OpenJDK 7. And, as said, I don't know what to depend on for Ubuntu & friends, although it might well be the very same stuff.
            Hide
            danielbeck Daniel Beck added a comment -

            But I don't know if Jenkins runs on OpenJDK 7

            Hasn't since 2.54.

            Show
            danielbeck Daniel Beck added a comment - But I don't know if Jenkins runs on OpenJDK 7 Hasn't since 2.54.
            Show
            mbmop Mostyn Bramley-Moore added a comment - Updated https://github.com/jenkinsci/packaging/pull/107

              People

              • Assignee:
                Unassigned
                Reporter:
                mbmop Mostyn Bramley-Moore
              • Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated: