[SCM] jenkins packaging branch, master, updated. upstream/1.409.3-7-gfd51978
The following commit has been merged in the master branch: commit fd51978f12f2a15e257796072e19a8b4307c1d30 Author: James Page Date: Fri Dec 9 13:05:52 2011 + Added NEWS file to explain changes to upstart configuration for ubuntu users diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 000..2bbb29a --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,8 @@ +jenkins (1.409.3-1) unstable; urgency=low + + * This release of jenkins for Debian makes some changes to the way that + the upstart configuration files work when built for Ubuntu; specifically + all environment variable changes should now be made in /etc/default/jenkins + and /etc/default/jenkins-slave rather than using upstart override files. + + -- James Page Fri, 09 Dec 2011 13:02:09 + -- jenkins packaging ___ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits
[SCM] jenkins packaging branch, master, updated. upstream/1.409.3-7-gfd51978
The following commit has been merged in the master branch: commit d7e0b7a97197f8098e8e42a66e8cfb3d47799749 Author: James Page Date: Fri Dec 9 12:58:18 2011 + Updates for init scripts, control var generation diff --git a/debian/bin/download-slave.sh b/debian/bin/download-slave.sh index aac0683..2648130 100755 --- a/debian/bin/download-slave.sh +++ b/debian/bin/download-slave.sh @@ -1,5 +1,13 @@ #!/bin/sh SLAVE_JAR=/var/run/jenkins/slave.jar +JENKINS_URL=$1 + +if [ -z "$JENKINS_URL" ] +then +echo URL of jenkins server must be provided +exit 1 +fi + # Retrieve Slave JAR from Master Server echo "Downloading slave.jar from ${JENKINS_URL}..." wget -q -O ${SLAVE_JAR} ${JENKINS_URL}/jnlpJars/slave.jar diff --git a/debian/changelog b/debian/changelog index 5b5cc5e..ad58d8b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,11 +3,13 @@ jenkins (1.409.3-1) unstable; urgency=low * Initial Debian release (Closes: #561963) * Disabled build of libjenkins-plugin-parent-java as not currently installable due to broken upstream maven-hpi-plugin. - * Added tradditional Debian init scripts and default configuration for jenkins + * Added Debian init scripts and default configuration for jenkins and jenkins-slave packages and updated rules to switch in upstart configuration for Ubuntu builds. + * d/bin/dowload-slave.sh: Updated to use parameter rather than +environment variable when locating Jenkins master server. - -- James Page Fri, 09 Dec 2011 10:11:39 + + -- James Page Fri, 09 Dec 2011 12:04:59 + jenkins (1.409.3-0ubuntu1) precise; urgency=low diff --git a/debian/control b/debian/control index f633e18..af45cb4 100644 --- a/debian/control +++ b/debian/control @@ -171,8 +171,7 @@ Package: jenkins Architecture: all Depends: adduser, - daemon, - psmisc, + ${jenkins-daemon-deps}, default-jre-headless | java6-runtime-headless, jenkins-common, ${misc:Depends} @@ -203,7 +202,7 @@ Package: jenkins-slave Architecture: all Depends: adduser, - daemon, + ${jenkins-daemon-deps}, default-jre-headless | java6-runtime-headless, ${misc:Depends} Recommends: jenkins-cli, ssh-import-id, ssh-server | openssh-server diff --git a/debian/debian_control_vars b/debian/debian_control_vars new file mode 100644 index 000..0c8ffb4 --- /dev/null +++ b/debian/debian_control_vars @@ -0,0 +1 @@ +jenkins-daemon-deps= daemon, psmisc diff --git a/debian/jenkins-slave.default b/debian/jenkins-slave.default index d01bfb8..8a8d5a4 100644 --- a/debian/jenkins-slave.default +++ b/debian/jenkins-slave.default @@ -25,11 +25,6 @@ JENKINS_HOME=/var/lib/jenkins # jenkins /run location JENKINS_RUN=/var/run/jenkins -# set this to false if you don't want Hudson to run by itself -# in this set up, you are expected to provide a servlet container -# to host jenkins. -RUN_STANDALONE=true - # URL of jenkins server to connect to # Not specifying this parameter will stop the slave # job from running. @@ -40,7 +35,7 @@ RUN_STANDALONE=true # hostname of the server the slave is running on. JENKINS_HOSTNAME="$(hostname)" -# log location. this may be a syslog facility.priority +# Log file location for use in Debian init script JENKINS_SLAVE_LOG=/var/log/jenkins/$NAME.log # OS LIMITS SETUP diff --git a/debian/jenkins-slave.init b/debian/jenkins-slave.init index fe1dcf6..4af3fbe 100644 --- a/debian/jenkins-slave.init +++ b/debian/jenkins-slave.init @@ -21,20 +21,16 @@ SCRIPTNAME=/etc/init.d/$NAME [ -r /etc/default/$NAME ] && . /etc/default/$NAME -# Only run this daemon if JENKINS url is specified. -# in defaults -[ -n "$JENKINS_URL" ] || exit 0 - DAEMON=/usr/bin/daemon -DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_SLAVE_LOG --pidfile=$PIDFILE" +DAEMON_ARGS="--name=$NAME --inherit --output=$JENKINS_SLAVE_LOG --pidfile=$PIDFILE" SU=/bin/su # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -# Exit if not supposed to run standalone -[ "$RUN_STANDALONE" = "false" ] && exit 0 +# Only run this daemon if JENKINS_URL is specified. +[ -n "$JENKINS_URL" ] || exit 0 # load environments if [ -r /etc/default/locale ]; then @@ -81,7 +77,7 @@ do_start() fi # Ensure that slave.jar has been downloaded from JENKINS_URL -$JENKINS_ROOT/bin/download-slave.sh +$JENKINS_ROOT/bin/download-slave.sh $JENKINS_URL > /dev/null 2>&1 || return 2 # --user in daemon doesn't prepare environment variables like HOME, USER, LOGNAME or USERNAME, # so we let su do so for us now @@ -95,7 +91,7 @@ do_start() # get_running() { -return `ps -U $JENKINS_USER --no-headers -f | egrep -e '(java|daemon)' | grep -c . ` +return `ps -U $JENKINS_USER --no-headers -f | egrep -e '(slave)' | grep -c . ` } force_stop() diff --git a/debian/jenkins-slave.upstart.in b/debian/jenkins-slave.upstart.in index 997ac57..fe96dd7 100644 --- a/debian/jenkins-slave.upstart.in +++ b/debian/jenkins-
[SCM] jenkins packaging branch, master, updated. upstream/1.409.3-7-gfd51978
The following commit has been merged in the master branch: commit 91aa82633c5d7881c9bcc8c1f1f86d4f21fc6a8b Author: James Page Date: Fri Dec 9 09:45:18 2011 + Added tradditional Debian init scripts for jenkins and jenkins-slave and updated rules to switch in upstart configuration for Ubuntu builds. diff --git a/debian/changelog b/debian/changelog index 56915cd..d8478b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,10 @@ jenkins (1.409.3-1) unstable; urgency=low * Initial Debian release (Closes: #561963) * Disabled build of libjenkins-plugin-parent-java as not currently installable due to broken upstream maven-hpi-plugin. + * Added tradditional Debian init scripts for jenkins and jenkins-slave +and updated rules to switch in upstart configuration for Ubuntu builds. - -- James Page Wed, 07 Dec 2011 09:16:03 + + -- James Page Fri, 09 Dec 2011 09:44:05 + jenkins (1.409.3-0ubuntu1) precise; urgency=low diff --git a/debian/control b/debian/control index 25b9d62..f633e18 100644 --- a/debian/control +++ b/debian/control @@ -172,6 +172,7 @@ Architecture: all Depends: adduser, daemon, + psmisc, default-jre-headless | java6-runtime-headless, jenkins-common, ${misc:Depends} diff --git a/debian/copyright b/debian/copyright index f9bdc5e..2345443 100644 --- a/debian/copyright +++ b/debian/copyright @@ -105,6 +105,11 @@ Files: debian/* Copyright: 2011 Canonical Ltd (http://www.canonical.com) License: MIT +Files: debian/jenkins.init + debian/jenkins.default +Copyright: 2004, Amelia A Lewis +License: MIT + License: Apache-2.0 On Debian GNU/Linux system you can find the complete text of the Apache-2.0 license in '/usr/share/common-licenses/Apache-2.0' diff --git a/debian/jenkins.default b/debian/jenkins.default new file mode 100644 index 000..77be80c --- /dev/null +++ b/debian/jenkins.default @@ -0,0 +1,58 @@ +# defaults for jenkins continuous integration server + +# pulled in from the init script; makes things easier. +NAME=jenkins + +# location of java +JAVA=/usr/bin/java + +# arguments to pass to java +#JAVA_ARGS="-Xmx256m" + +PIDFILE=/var/run/jenkins/jenkins.pid + +# user id to be invoked as (otherwise will run as root; not wise!) +JENKINS_USER=jenkins + +# location of jenkins arch indep files +JENKINS_ROOT=/usr/share/jenkins + +# location of the jenkins war file +JENKINS_WAR=/usr/share/jenkins/jenkins.war + +# jenkins home location +JENKINS_HOME=/var/lib/jenkins + +# jenkins /run location +JENKINS_RUN=/var/run/jenkins + +# set this to false if you don't want Hudson to run by itself +# in this set up, you are expected to provide a servlet container +# to host jenkins. +RUN_STANDALONE=true + +# log location. this may be a syslog facility.priority +JENKINS_LOG=/var/log/jenkins/$NAME.log + +# OS LIMITS SETUP +# comment this out to observe /etc/security/limits.conf +# this is on by default because http://github.com/feniix/hudson/commit/d13c08ea8f5a3fa730ba174305e6429b74853927 +# reported that Ubuntu's PAM configuration doesn't include pam_limits.so, and as a result the # of file +# descriptors are forced to 1024 regardless of /etc/security/limits.conf +MAXOPENFILES=8192 + +# port for HTTP connector (default 8080; disable with -1) +HTTP_PORT=8080 + +# port for AJP connector (disabled by default) +AJP_PORT=-1 + +# arguments to pass to jenkins. +# --javahome=$JAVA_HOME +# --httpPort=$HTTP_PORT (default 8080; disable with -1) +# --httpsPort=$HTTP_PORT +# --ajp13Port=$AJP_PORT +# --argumentsRealm.passwd.$ADMIN_USER=[password] +# --argumentsRealm.$ADMIN_USER=admin +# --webroot=~/.jenkins/war +JENKINS_ARGS="--webroot=$JENKINS_RUN/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --preferredClassLoader=java.net.URLClassLoader" diff --git a/debian/jenkins.init b/debian/jenkins.init new file mode 100644 index 000..ad24932 --- /dev/null +++ b/debian/jenkins.init @@ -0,0 +1,235 @@ +#!/bin/bash +# /etc/init.d/jenkins +# debian-compatible jenkins startup script. +# Amelia A Lewis +# +### BEGIN INIT INFO +# Provides: jenkins +# Required-Start:$remote_fs $syslog $network +# Required-Stop: $remote_fs $syslog $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start jenkins at boot time +# Description: Controls the jenkins continuous integration engine. +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +DESC="Jenkins Continuous Integration Server" +NAME=jenkins +SCRIPTNAME=/etc/init.d/$NAME + +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +#DAEMON=$JENKINS_SH +DAEMON=/usr/bin/daemon +DAEMON_ARGS="--name=$NAME --inherit --env=JENKINS_HOME=$JENKINS_HOME --output=$JENKINS_LOG --pidfile=$PIDFILE" + +SU=/bin/su + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Exit if not supposed to run standalone +[ "$RUN_STANDALONE" = "false" ] && exit 0 + +# load environments +if [ -r /etc/default/locale ]; then + . /etc/default/locale + expor
[SCM] jenkins packaging branch, master, updated. upstream/1.409.3-7-gfd51978
The following commit has been merged in the master branch: commit 34dce07aaf167d83cbc42e551725eba37be29144 Author: James Page Date: Fri Dec 9 10:13:01 2011 + Added tradditional Debian init scripts and default configuration for jenkins and jenkins-slave packages and updated rules to switch in upstart configuration for Ubuntu builds. diff --git a/debian/changelog b/debian/changelog index d8478b9..5b5cc5e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,10 +3,11 @@ jenkins (1.409.3-1) unstable; urgency=low * Initial Debian release (Closes: #561963) * Disabled build of libjenkins-plugin-parent-java as not currently installable due to broken upstream maven-hpi-plugin. - * Added tradditional Debian init scripts for jenkins and jenkins-slave -and updated rules to switch in upstart configuration for Ubuntu builds. + * Added tradditional Debian init scripts and default configuration for jenkins +and jenkins-slave packages and updated rules to switch in upstart +configuration for Ubuntu builds. - -- James Page Fri, 09 Dec 2011 09:44:05 + + -- James Page Fri, 09 Dec 2011 10:11:39 + jenkins (1.409.3-0ubuntu1) precise; urgency=low diff --git a/debian/jenkins.default b/debian/jenkins-slave.default similarity index 54% copy from debian/jenkins.default copy to debian/jenkins-slave.default index 77be80c..d01bfb8 100644 --- a/debian/jenkins.default +++ b/debian/jenkins-slave.default @@ -1,15 +1,17 @@ -# defaults for jenkins continuous integration server +# defaults for jenkins-slave component of the jenkins continuous integration +# system # pulled in from the init script; makes things easier. -NAME=jenkins +NAME=jenkins-slave # location of java JAVA=/usr/bin/java -# arguments to pass to java +# arguments to pass to java - optional #JAVA_ARGS="-Xmx256m" -PIDFILE=/var/run/jenkins/jenkins.pid +# for daemon to use +PIDFILE=/var/run/jenkins/$NAME.pid # user id to be invoked as (otherwise will run as root; not wise!) JENKINS_USER=jenkins @@ -17,9 +19,6 @@ JENKINS_USER=jenkins # location of jenkins arch indep files JENKINS_ROOT=/usr/share/jenkins -# location of the jenkins war file -JENKINS_WAR=/usr/share/jenkins/jenkins.war - # jenkins home location JENKINS_HOME=/var/lib/jenkins @@ -31,28 +30,27 @@ JENKINS_RUN=/var/run/jenkins # to host jenkins. RUN_STANDALONE=true +# URL of jenkins server to connect to +# Not specifying this parameter will stop the slave +# job from running. +#JENKINS_URL="" + +# Name of slave configuration to use at JENKINS_URL +# Override if it need to be something other than the +# hostname of the server the slave is running on. +JENKINS_HOSTNAME="$(hostname)" + # log location. this may be a syslog facility.priority -JENKINS_LOG=/var/log/jenkins/$NAME.log +JENKINS_SLAVE_LOG=/var/log/jenkins/$NAME.log # OS LIMITS SETUP # comment this out to observe /etc/security/limits.conf # this is on by default because http://github.com/feniix/hudson/commit/d13c08ea8f5a3fa730ba174305e6429b74853927 # reported that Ubuntu's PAM configuration doesn't include pam_limits.so, and as a result the # of file -# descriptors are forced to 1024 regardless of /etc/security/limits.conf +# descriptors are forced to 1024 regardless of /etc/security/limits.confa +# NOTE - Ubuntu Users - this is not used by the upstart configuration - please use an upstart overrides file +# to change the OS limits setup. MAXOPENFILES=8192 -# port for HTTP connector (default 8080; disable with -1) -HTTP_PORT=8080 - -# port for AJP connector (disabled by default) -AJP_PORT=-1 - -# arguments to pass to jenkins. -# --javahome=$JAVA_HOME -# --httpPort=$HTTP_PORT (default 8080; disable with -1) -# --httpsPort=$HTTP_PORT -# --ajp13Port=$AJP_PORT -# --argumentsRealm.passwd.$ADMIN_USER=[password] -# --argumentsRealm.$ADMIN_USER=admin -# --webroot=~/.jenkins/war -JENKINS_ARGS="--webroot=$JENKINS_RUN/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT --preferredClassLoader=java.net.URLClassLoader" +# Arguments to pass to jenkins slave on startup +JENKINS_ARGS="-jnlpUrl $JENKINS_URL/computer/$JENKINS_HOSTNAME/slave-agent.jnlp" diff --git a/debian/jenkins.init b/debian/jenkins-slave.init similarity index 81% copy from debian/jenkins.init copy to debian/jenkins-slave.init index ad24932..fe1dcf6 100644 --- a/debian/jenkins.init +++ b/debian/jenkins-slave.init @@ -1,29 +1,32 @@ #!/bin/bash -# /etc/init.d/jenkins -# debian-compatible jenkins startup script. -# Amelia A Lewis +# /etc/init.d/jenkins-slave +# debian-compatible jenkins-slave startup script. +# Based on work by Amelia A Lewis # ### BEGIN INIT INFO -# Provides: jenkins +# Provides: jenkins-slave # Required-Start:$remote_fs $syslog $network # Required-Stop: $remote_fs $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: Start jenkins at boot time -# Description: Controls the jenkins continuous integration