Skip to content
Browse files

Merge pull request #101 from raul-arabaolaza/JENKINS-45287

[JENKINS-45287] Debian packaging should not be satisfied by Java 9
  • Loading branch information
svanoort committed Jul 19, 2017
2 parents 3835c07 + d3f21f5 commit e3ddccea97cac6649b8136e8bc574583f5df6fca
Showing with 40 additions and 4 deletions.
  1. +1 −1 deb/build/debian/control
  2. +0 −3 deb/build/debian/jenkins.default
  3. +23 −0 deb/build/debian/jenkins.init
  4. +16 −0 deb/publish/gen.rb
@@ -8,7 +8,7 @@ Homepage: @@HOMEPAGE@@

Architecture: all
Depends: ${misc:Depends}, daemon, adduser, procps, psmisc, net-tools, default-jre-headless (>= 2:1.8) | java8-runtime-headless
Depends: ${misc:Depends}, daemon, adduser, procps, psmisc, net-tools
Conflicts: hudson
Replaces: hudson
Description: @@DESCRIPTION_FILE@@
@@ -3,9 +3,6 @@
# pulled in from the init script; makes things easier.

# location of java

# arguments to pass to java

# Allow graphs etc. to work even when an X server is present
@@ -24,6 +24,9 @@ SCRIPTNAME=/etc/init.d/$NAME
DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_LOG --pidfile=$PIDFILE"
JAVA=`type -p java`


if [ -n "$UMASK" ]; then
@@ -43,6 +46,26 @@ if [ "$RUN_STANDALONE" = "false" ]; then
exit 1

# Make sure there exists a java executable, it may not be allways the case
if [ -z "$JAVA" ]; then
echo "ERROR: No Java executable found in current PATH: $PATH" >&2
echo "If you actually have java installed on the system make sure the executable is in the aforementioned path and that 'type -p java' returns the java executable path" >&2
exit 1

# Work out the JAVA version we are working with:
JAVA_VERSION=$($JAVA -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/\1\2/p;')

echo "Correct java version found" >&2
echo "Found an incorrect Java version" >&2
echo "Java version found:" >&2
echo $($JAVA -version) >&2
echo "Aborting" >&2
exit 1

# load environments
if [ -r /etc/default/locale ]; then
. /etc/default/locale
@@ -31,6 +31,21 @@
<pre style="padding:0.5em; margin:1em; background-color:black; color:white">
deb #{url} binary/
You will need to explicitly install a Java runtime environment, <b>because Jenkins does not work with Java 9</b>, 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 <a href="">JENKINS-40689</a>
for more details about Jenkins and Java 9 compatibility.
<li>2.54 (2017-04) and newer: Java 8</li>
<li>1.612 (2015-05) and newer: Java 7</li>
Update your local package index, then finally install #{productName}:
@@ -39,6 +54,7 @@
sudo apt-get update
sudo apt-get install #{artifactName}
See <a href="">Wiki</a> for more information, including notes regarding upgrade from Hudson.

0 comments on commit e3ddcce

Please sign in to comment.
You can’t perform that action at this time.