-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
ubuntu 16.04
While trying to test 2.107.3 I ran into the debian package not depending on any jre anymore.
I.e.:
1) apt-get install jenkins fails, jenkins can't be started because java NotFound
2) apt-get install default-jre-headless jenkins fails, systemd tries to start jenkins before installing the jre.
Requiring users to do 'apt-get install default-jre-headless' then 'apt-get install jenkins' is not the way package dependencies should work IMHO.
- duplicates
-
JENKINS-51253 jenkins_2.107.3_all.deb depends on java being installed but no longer has this explicit dependency
-
- Closed
-
diff --git a/deb/build/debian/control b/deb/build/debian/control
index 2ea8ca2..8808fd3 100644
— a/deb/build/debian/control
+++ b/deb/build/debian/control
@@ -8,7 +8,7 @@ Homepage: @@HOMEPAGE@@
Package: @@ARTIFACTNAME@@
Architecture: all
-Depends: ${misc:Depends}, daemon, adduser, procps, psmisc, net-tools
-Conflicts: hudson
+Depends: ${misc:Depends}, daemon, adduser, procps, psmisc, net-tools, default-jre-headless (>= 2:1.8)
+Conflicts: hudson, default-jre-headless (>= 2:1.9)
Replaces: hudson
Description: @@DESCRIPTION_FILE@kohsuke
With the patch above, 'apt-get install jenkins' works again (and installs with java8) but should fail with java9
I've tested it on bare ubuntu 16.04.