[pkg-java] r8489 - trunk/jetty6/debian
Ludovic Claude
ludovicc-guest at alioth.debian.org
Sun Jun 14 00:02:53 UTC 2009
Author: ludovicc-guest
Date: 2009-06-14 00:02:49 +0000 (Sun, 14 Jun 2009)
New Revision: 8489
Added:
trunk/jetty6/debian/jetty6.init
trunk/jetty6/debian/libjetty6-setuid-java.install
trunk/jetty6/debian/libjetty6-setuid-java.links
Modified:
trunk/jetty6/debian/TODO
trunk/jetty6/debian/build.xml
trunk/jetty6/debian/changelog
trunk/jetty6/debian/control
trunk/jetty6/debian/jetty-extra.conf
trunk/jetty6/debian/jetty6.default
trunk/jetty6/debian/jetty6.install
trunk/jetty6/debian/jetty6.links
trunk/jetty6/debian/jetty6.postinst
trunk/jetty6/debian/jetty6.postrm
trunk/jetty6/debian/libjetty6-extra-java.dirs
trunk/jetty6/debian/libjetty6-extra-java.install
trunk/jetty6/debian/libjetty6-extra-java.links
trunk/jetty6/debian/libjetty6-java.dirs
trunk/jetty6/debian/libjetty6-java.install
trunk/jetty6/debian/libjetty6-java.links
trunk/jetty6/debian/module.xml
trunk/jetty6/debian/rules
Log:
* Add init.d script and other goodies
Modified: trunk/jetty6/debian/TODO
===================================================================
--- trunk/jetty6/debian/TODO 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/TODO 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,8 +1,19 @@
update debian/changelog (jetty-version) before building for a new release.
Modules to add:
+
jetty-jsp-2.1
- glassfish jsp source + jetty-jsp source needs to be compiled/built to generate a separate deb package
jetty-plus
- geronimo-jta must be available as a deb package (build & runtime dependency)
+
+jetty-annotations
+ - genonimo-annotation must be available as a deb package (build & runtime dependency)
+
+jetty-terracota
+
+jetty-xbean
+ - spring-framework must be available as a deb package (build dependency)
+ - xbean must include the module xbean-spring
+
Modified: trunk/jetty6/debian/build.xml
===================================================================
--- trunk/jetty6/debian/build.xml 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/build.xml 2009-06-14 00:02:49 UTC (rev 8489)
@@ -7,6 +7,7 @@
<property name="lib.dir" value="${basedir}/lib"/>
<property name="etc.dir" value="${basedir}/etc"/>
<property name="javadoc.dir" value="${basedir}/javadoc"/>
+ <property name="module.script" location="debian/module.xml"/>
<path id="classpath">
<fileset dir="${target.dir}">
@@ -20,31 +21,31 @@
<mkdir dir="${lib.dir}"/>
<mkdir dir="${etc.dir}"/>
- <ant dir="${basedir}/modules/util/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/modules/util/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-util"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}"/>
</ant>
- <ant dir="${basedir}/modules/util5/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/modules/util5/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-util5"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/util5"/>
</ant>
- <ant dir="${basedir}/modules/jetty/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/modules/jetty/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}"/>
</ant>
- <ant dir="${basedir}/extras/sslengine/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/extras/sslengine/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-sslengine"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/sslengine"/>
</ant>
- <ant dir="${basedir}/modules/start/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/modules/start/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-start"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${basedir}"/>
@@ -54,43 +55,55 @@
<!-- EXTRAS -->
- <ant dir="${basedir}/modules/management/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/modules/html/" antfile="${module.script}" inheritRefs="true">
+ <property name="module-name" value="jetty-html"/>
+ <property name="module-version" value="${VERSION}"/>
+ <property name="module-libdir" value="${lib.dir}/ext"/>
+ </ant>
+
+ <ant dir="${basedir}/modules/management/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-management"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/management"/>
</ant>
- <ant dir="${basedir}/modules/naming/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/modules/naming/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-naming"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/naming"/>
</ant>
- <ant dir="${basedir}/extras/servlet-tester/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/extras/servlet-tester/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-servlet-tester"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/ext"/>
</ant>
- <ant dir="${basedir}/extras/ajp/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/extras/ajp/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-ajp"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/ext"/>
</ant>
- <ant dir="${basedir}/extras/threadpool/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/extras/setuid/modules/java/" antfile="${module.script}" inheritRefs="true">
+ <property name="module-name" value="jetty-setuid"/>
+ <property name="module-version" value="${VERSION}"/>
+ <property name="module-libdir" value="${lib.dir}/ext"/>
+ </ant>
+
+ <ant dir="${basedir}/extras/threadpool/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-java5-threadpool"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/ext"/>
</ant>
- <ant dir="${basedir}/extras/client/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/extras/client/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-client"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/ext"/>
</ant>
- <ant dir="${basedir}/contrib/jetty-rewrite-handler/" antfile="../../debian/module.xml" inheritRefs="true">
+ <ant dir="${basedir}/contrib/jetty-rewrite-handler/" antfile="${module.script}" inheritRefs="true">
<property name="module-name" value="jetty-rewrite-handler"/>
<property name="module-version" value="${VERSION}"/>
<property name="module-libdir" value="${lib.dir}/ext"/>
Modified: trunk/jetty6/debian/changelog
===================================================================
--- trunk/jetty6/debian/changelog 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/changelog 2009-06-14 00:02:49 UTC (rev 8489)
@@ -2,6 +2,11 @@
* Add myself to Uploaders
* Change the build dependency on java-gcj to default-jdk
+ * Add init.d startup script
+ * Add dependencies on ant, libslf4j-java, libxerces2-java, libtomcat6-java
+ for libjetty6-extra-java, add links for the lib folder
+ * Add the package libjetty6-setuid-java for the Setuid module (with native
+ code)
-- Ludovic Claude <ludovic.claude at laposte.net> Sat, 13 Jun 2009 12:05:09 +0100
Modified: trunk/jetty6/debian/control
===================================================================
--- trunk/jetty6/debian/control 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/control 2009-06-14 00:02:49 UTC (rev 8489)
@@ -21,7 +21,8 @@
Package: libjetty6-extra-java
Architecture: all
-Depends: ${misc:Depends}, libjetty6-java, libmx4j-java, libgnumail-java, libgnujaf-java
+Depends: ${misc:Depends}, libjetty6-java, libmx4j-java, libgnumail-java, libgnujaf-java, ant,
+ libslf4j-java, libxerces2-java, libtomcat6-java
Suggests: jetty6
Description: Java servlet engine and webserver -- extra libraries
Jetty is an Open Source HTTP Servlet Server written in 100% Java.
@@ -32,10 +33,22 @@
jetty-servlet-tester, jetty-ajp, jetty-java5-threadpool,
jetty-client, jetty-rewrite-handler
+Package: libjetty6-setuid-java
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libjetty6-java
+Suggests: jetty6
+Description: Java servlet engine and webserver -- extra libraries
+ Jetty is an Open Source HTTP Servlet Server written in 100% Java.
+ It is designed to be light weight, high performance, embeddable,
+ extensible and flexible, thus making it an ideal platform for serving
+ dynamic HTTP requests from any Java application.
+ Setuid can be used to start Jetty as root so that privileged ports
+ may be accessed and then switch to a non-root user for security.
+
Package: jetty6
Architecture: all
Depends: ${misc:Depends}, libjetty6-java, adduser
-Suggests: libjetty6-extra-java
+Suggests: libjetty6-extra-java, libjetty6-setuid-java
Description: Java servlet engine and webserver
Jetty is an Open Source HTTP Servlet Server written in 100% Java.
It is designed to be light weight, high performance, embeddable,
Modified: trunk/jetty6/debian/jetty-extra.conf
===================================================================
--- trunk/jetty6/debian/jetty-extra.conf 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/jetty-extra.conf 2009-06-14 00:02:49 UTC (rev 8489)
@@ -3,7 +3,6 @@
/etc/jetty6/jetty-logging.xml
/etc/jetty6/jetty-jmx.xml
/etc/jetty6/jetty.xml
-/etc/jetty6/jetty-jaas.xml
/etc/jetty6/jetty-plus.xml
/etc/jetty6/jetty-ajp.xml
/etc/jetty6/jetty-ssl.xml
Modified: trunk/jetty6/debian/jetty6.default
===================================================================
--- trunk/jetty6/debian/jetty6.default 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/jetty6.default 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,7 +1,40 @@
-# Defaults for jetty see /etc/init.d/jetty for more
+# Defaults for jetty6 see /etc/init.d/jetty6 for more
-NO_START=1 # change to 0 to allow Jetty to start
+# change to 0 to allow Jetty6 to start
+NO_START=1
TMP=/var/cache/jetty6
JAVA_OPTIONS="-Xmx256m -Djava.awt.headless=true $JETTY6_OPTIONS"
-JETTY_USER=jetty
+
+# Run Jetty6 as this user ID (default: jetty6)
+# Set this to an empty string to prevent Jetty6 from starting automatically
+JETTY6_USER=jetty6
+
+# The network host
+#JETTY6_HOST=localhost
+
+# The network port used by Jetty6
+#JETTY6_PORT=8080
+
+# Timeout in seconds for the shutdown of all webapps
+#JETTY6_SHUTDOWN=30
+
+# Additional arguments to pass to Jetty6
+JETTY6_ARGS=
+
+# Extra options to pass to the JVM
+JAVA_OPTIONS=
+
+# Home of Java installation.
+#JAVA_HOME=
+
+# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
+# defined in /etc/default/jetty6). Should contain a list of space separated directories.
+#JDK_DIRS="/usr/lib/jvm/default-java /usr/lib/jvm/java-6-sun"
+
+# Jetty6 uses a directory to store temporary files like unpacked webapps
+#JETTY6_TMP=/var/cache/jetty6
+
+# Jetty6 uses a config file to setup its boot classpath
+#JETTY6_START_CONFIG=/etc/jetty6/start.config
+
Added: trunk/jetty6/debian/jetty6.init
===================================================================
--- trunk/jetty6/debian/jetty6.init (rev 0)
+++ trunk/jetty6/debian/jetty6.init 2009-06-14 00:02:49 UTC (rev 8489)
@@ -0,0 +1,335 @@
+#!/bin/bash -e
+#
+# /etc/init.d/jetty6 -- startup script for jetty 6.1.18
+#
+# Written by Philipp Meier <meier at meisterbohne.de>
+#
+### BEGIN INIT INFO
+# Provides: jetty6
+# Required-Start: $syslog $network
+# Required-Stop: $syslog $network
+# Should-Start: $local_fs
+# Should-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start Jetty6
+# Description: Start Jetty6 HTTP server and servlet container.
+### END INIT INFO
+
+# Configuration files
+#
+# /etc/default/jetty6
+# If it exists, this is read at the start of script. It may perform any
+# sequence of shell commands, like setting relevant environment variables.
+#
+# /etc/jetty6/jetty.conf
+# If found, the file will be used as this script's configuration.
+# Each line in the file may contain:
+# - A comment denoted by the pound (#) sign as first non-blank character.
+# - The path to a regular file, which will be passed to jetty as a
+# config.xml file.
+# - The path to a directory. Each *.xml file in the directory will be
+# passed to jetty as a config.xml file.
+#
+# The files will be checked for existence before being passed to jetty.
+#
+# /etc/jetty6/jetty.xml
+# If found, used as this script's configuration file, but only if
+# /etc/jetty6/jetty.conf was not present. See above.
+#
+# Configuration variables (to define in /etc/default/jetty6)
+#
+# JAVA_HOME
+# Home of Java installation.
+#
+# JAVA
+# Command to invoke Java. If not set, $JAVA_HOME/bin/java will be
+# used.
+#
+# JAVA_OPTIONS
+# Extra options to pass to the JVM
+#
+# JETTY6_PORT
+# Override the default port for Jetty servers. If not set then 8080
+# will be used. The java system property "jetty.port" will be set to
+# this value for use in configure.xml files. For example, the following
+# idiom is widely used in the demo config files to respect this property
+# in Listener configuration elements:
+#
+# <Set name="Port"><SystemProperty name="jetty.port" default="8080"/></Set>
+#
+# JETTY6_ARGS
+# The default arguments to pass to jetty.
+#
+# JETTY6_USER
+# if set, then used as a username to run the server as
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+NAME=jetty6
+DESC="Jetty6 servlet engine"
+JETTY6_HOME=/usr/share/$NAME
+START_JAR="$JETTY6_HOME/start.jar"
+
+# The following variables can be overwritten in /etc/default/jetty6
+
+# Whether to start jetty6 (as a daemon) or not
+NO_START=0
+
+# Run Jetty6 as this user ID (default: jetty6)
+# Set this to an empty string to prevent Jetty6 from starting automatically
+JETTY6_USER=jetty6
+
+# The network host
+JETTY6_HOST=$(uname -n)
+
+# The network port used by Jetty6
+JETTY6_PORT=8080
+
+# Additional arguments to pass to Jetty6
+JETTY6_ARGS=
+
+# Extra options to pass to the JVM
+JAVA_OPTIONS=
+
+# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
+# defined in /etc/default/jetty6). Should contain a list of space separated directories.
+JDK_DIRS="
+ /usr/lib/jvm/default-java \
+ /usr/lib/jvm/java-6-sun \
+ /usr/lib/jvm/java-6-openjdk \
+ /usr/lib/jvm/java-1.5.0-sun \
+ /usr/lib/jvm/java-gcj \
+ /usr/lib/j2sdk1.6-sun \
+ /usr/lib/j2sdk1.5-sun \
+ /usr/lib/j2sdk1.4-sun \
+ /usr/lib/j2sdk1.4 \
+ /usr/lib/j2se/1.4 \
+ /usr/lib/kaffe/ \
+ "
+
+# Timeout in seconds for the shutdown of all webapps
+JETTY6_SHUTDOWN=30
+
+# Jetty6 uses a directory to store temporary files like unpacked webapps
+JETTY6_TMP=/var/cache/jetty6
+
+# Jetty6 uses a config file to setup its boot classpath
+JETTY6_START_CONFIG=/etc/jetty6/start.config
+
+# End of variables that can be overwritten in /etc/default/jetty6
+
+# overwrite settings from default file
+if [ -f /etc/default/jetty6 ]; then
+ . /etc/default/jetty6
+fi
+
+# Check whether jetty6 is still installed (it might not be if this package was
+# removed and not purged)
+if [ -r "$START_JAR" ]; then
+ HAVE_JETTY6=1
+else
+ exit 0
+fi
+
+# Check whether startup has been disabled
+if [ "$NO_START" != "0" -a "$1" != "stop" ]; then
+ [ "$VERBOSE" != "no" ] && echo "Not starting jetty6 - edit /etc/default/jetty6 and change NO_START to be 0 (or comment it out).";
+ exit 0;
+fi
+
+if [ -z "$JETTY6_USER" ]; then
+ echo "Not starting/stopping $DESC as configured"
+ echo "(JETTY6_USER is empty in /etc/default/jetty6)."
+ exit 0
+fi
+
+# Look for the right JVM to use
+for jdir in $JDK_DIRS; do
+ if [ -d "$jdir" -a -z "${JAVA_HOME}" ]; then
+ JAVA_HOME="$jdir"
+ fi
+done
+export JAVA_HOME
+
+export JAVA="$JAVA_HOME/bin/java"
+
+# Set java.awt.headless=true if JAVA_OPTIONS is not set so the
+# Xalan XSL transformer can work without X11 display on JDK 1.4+
+if [ -z "$JAVA_OPTIONS" ]; then
+ JAVA_OPTIONS="-Xmx256m \
+ -Djava.awt.headless=true \
+ -Djava.io.tmpdir=\"$JETTY6_TMP\" \
+ -Djava.library.path=/usr/lib"
+fi
+export JAVA_OPTIONS
+
+# Define other required variables
+PIDFILE="/var/run/$NAME.pid"
+LOGDIR="/var/log/jetty6"
+WEBAPPDIR="$JETTY6_HOME/webapps"
+
+##################################################
+# Check for JAVA_HOME
+##################################################
+if [ -z "$JAVA_HOME" ]; then
+ echo "Could not start $DESC because no Java Development Kit"
+ echo "(JDK) was found. Please download and install JDK 1.4 or higher and set"
+ echo "JAVA_HOME in /etc/default/jetty6 to the JDK's installation directory."
+ exit 0
+
+fi
+
+CONFIG_LINES=$(cat /etc/jetty6/jetty.conf | grep -v "^[:space:]*#" | tr "\n" " ")
+
+##################################################
+# Get the list of config.xml files from jetty.conf
+##################################################
+if [ ! -z "${CONFIG_LINES}" ]
+then
+ for CONF in ${CONFIG_LINES}
+ do
+ if [ ! -r "$CONF" ]
+ then
+ echo "** WARNING: Cannot read '$CONF' specified in '$JETTY_CONF'"
+ elif [ -f "$CONF" ]
+ then
+ # assume it's a configure.xml file
+ CONFIGS="$CONFIGS $CONF"
+ elif [ -d "$CONF" ]
+ then
+ # assume it's a directory with configure.xml files
+ # for example: /etc/jetty.d/
+ # sort the files before adding them to the list of CONFIGS
+ XML_FILES=`ls ${CONF}/*.xml | sort | tr "\n" " "`
+ for FILE in ${XML_FILES}
+ do
+ if [ -r "$FILE" ] && [ -f "$FILE" ]
+ then
+ CONFIGS="$CONFIGS $FILE"
+ else
+ echo "** WARNING: Cannot read '$FILE' specified in '$JETTY_CONF'"
+ fi
+ done
+ else
+ echo "** WARNING: Don''t know what to do with '$CONF' specified in '$JETTY_CONF'"
+ fi
+ done
+fi
+
+#####################################################
+# Run the standard server if there's nothing else to run
+#####################################################
+if [ -z "$CONFIGS" ]
+then
+ CONFIGS="/etc/jetty6/jetty-logging.xml /etc/jetty6/jetty.xml"
+fi
+
+
+ARGUMENTS="$JAVA_OPTIONS -DSTART=$JETTY6_START_CONFIG -Djetty.home=$JETTY6_HOME -Djetty.logs=$LOGDIR -Djetty.host=$JETTY6_HOST -Djetty.port=$JETTY6_PORT -jar $JETTY_ARGS $START_JAR $CONFIGS"
+
+##################################################
+# Do the action
+##################################################
+case "$1" in
+ start)
+ if start-stop-daemon --quiet --test --start --pidfile "$PIDFILE" \
+ --user "$JETTY6_USER" --startas "$JAVA" > /dev/null; then
+
+ # Look for rotatelogs/rotatelogs2
+ if [ -x /usr/sbin/rotatelogs ]; then
+ ROTATELOGS=/usr/sbin/rotatelogs
+ else
+ ROTATELOGS=/usr/sbin/rotatelogs2
+ fi
+
+ if [ -f $PIDFILE ]
+ then
+ echo "$PIDFILE exists, but jetty6 was not running. Ignoring $PIDFILE"
+ fi
+
+ echo -n "Starting $DESC (reachable on http://$JETTY6_HOST:$JETTY6_PORT/): "
+ if [ \! -e "$LOGDIR/out.log" ]; then
+ echo "Create log file..."
+ sudo -u $JETTY6_USER touch "$LOGDIR/out.log"
+ chown $JETTY6_USER:adm "$LOGDIR/out.log"
+ fi
+ echo "Rotate logs..."
+ sudo -b -u $JETTY6_USER $ROTATELOGS "$LOGDIR/out.log" 86400 \
+ < "$LOGDIR/out.log"
+ sudo -u $JETTY6_USER /bin/sh -c "$JAVA $ARGUMENTS >> $LOGDIR/out.log 2>&1 & \
+ echo \$!" > "$PIDFILE"
+ echo "$NAME started."
+ else
+ echo "(already running)."
+ exit 1
+ fi
+ ;;
+
+ stop)
+ echo -n "Stopping $DESC (was reachable on http://$JETTY6_HOST:$JETTY6_PORT/): "
+
+ if start-stop-daemon --quiet --test --start --pidfile "$PIDFILE" \
+ --user "$JETTY6_USER" --startas "$JAVA" > /dev/null; then
+ if [ -x "$PIDFILE" ]; then
+ echo "(not running but $PIDFILE exists)."
+ else
+ echo "(not running)."
+ fi
+ else
+ start-stop-daemon --quiet --stop \
+ --pidfile "$PIDFILE" --user "$JETTY6_USER" \
+ --startas "$JAVA" > /dev/null
+ while ! start-stop-daemon --quiet --test --start \
+ --pidfile "$PIDFILE" --user "$JETTY6_USER" \
+ --startas "$JAVA" > /dev/null; do
+ sleep 1
+ echo -n "."
+ JETTY6_SHUTDOWN=`expr $JETTY6_SHUTDOWN - 1` || true
+ if [ $JETTY6_SHUTDOWN -ge 0 ]; then
+ start-stop-daemon --oknodo --quiet --stop \
+ --pidfile "$PIDFILE" --user "$JETTY6_USER" \
+ --startas "$JAVA"
+ else
+ echo -n " (killing) "
+ start-stop-daemon --stop --signal 9 --oknodo \
+ --quiet --pidfile "$PIDFILE" \
+ --user "$JETTY6_USER"
+ fi
+ done
+ rm -f "$PIDFILE"
+ echo "$NAME stopped."
+ fi
+ ;;
+
+ restart|force-reload)
+ $0 stop $*
+ sleep 1
+ $0 start $*
+ ;;
+
+ check)
+ echo "Checking arguments to Jetty6: "
+ echo
+ echo "PIDFILE = $PIDFILE"
+ echo "JAVA_OPTIONS = $JAVA_OPTIONS"
+ echo "JAVA = $JAVA"
+ echo "JETTY6_USER = $JETTY6_USER"
+ echo "JETTY6_HOST = $JETTY6_HOST"
+ echo "JETTY6_PORT = $JETTY6_PORT"
+ echo "ARGUMENTS = $ARGUMENTS"
+
+ if [ -f $PIDFILE ]
+ then
+ echo "Jetty6 running pid="`cat $PIDFILE`
+ exit 0
+ fi
+ exit 1
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/jetty6 {start|stop|restart|force-reload|check}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Modified: trunk/jetty6/debian/jetty6.install
===================================================================
--- trunk/jetty6/debian/jetty6.install 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/jetty6.install 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,7 +1,12 @@
etc/* etc/jetty6
webapps/README.TXT var/lib/jetty6/webapps
-contexts/README.TXT etc/jetty6/contexts
+contexts etc/jetty6
+resources usr/share/jetty6
README.txt usr/share/doc/jetty6
VERSION.txt usr/share/doc/jetty6
-LICENSES usr/share/doc/jetty6
+LICENSES/cla-* usr/share/doc/jetty6/LICENSES
+LICENSES/ccla-* usr/share/doc/jetty6/LICENSES
+LICENSES/contrib usr/share/doc/jetty6/LICENSES
+LICENSES/NOTICE.txt usr/share/doc/jetty6/LICENSES
javadoc/* usr/share/doc/jetty6/api
+debian/README.Debian usr/share/doc/jetty6
Modified: trunk/jetty6/debian/jetty6.links
===================================================================
--- trunk/jetty6/debian/jetty6.links 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/jetty6.links 2009-06-14 00:02:49 UTC (rev 8489)
@@ -2,3 +2,4 @@
var/log/jetty6 usr/share/jetty6/logs
etc/jetty6 usr/share/jetty6/etc
etc/jetty6/contexts usr/share/jetty6/contexts
+usr/share/doc/jetty6/api usr/share/jetty6/javadoc
Modified: trunk/jetty6/debian/jetty6.postinst
===================================================================
--- trunk/jetty6/debian/jetty6.postinst 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/jetty6.postinst 2009-06-14 00:02:49 UTC (rev 8489)
@@ -2,12 +2,12 @@
case "$1" in
configure)
- if ! id jetty > /dev/null 2>&1 ; then
+ if ! id jetty6 > /dev/null 2>&1 ; then
adduser --system --home /usr/share/jetty6 --no-create-home \
--ingroup nogroup --disabled-password --shell /bin/false \
- jetty
+ jetty6
fi
- chown -R jetty:adm /var/cache/jetty6 /var/log/jetty6 /var/lib/jetty6
+ chown -R jetty6:adm /var/cache/jetty6 /var/log/jetty6 /var/lib/jetty6
chmod 750 /var/log/jetty6
;;
Modified: trunk/jetty6/debian/jetty6.postrm
===================================================================
--- trunk/jetty6/debian/jetty6.postrm 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/jetty6.postrm 2009-06-14 00:02:49 UTC (rev 8489)
@@ -7,7 +7,7 @@
case "$1" in
purge)
- userdel jetty || true
+ userdel jetty6 || true
rm -rf /var/log/jetty6
;;
Modified: trunk/jetty6/debian/libjetty6-extra-java.dirs
===================================================================
--- trunk/jetty6/debian/libjetty6-extra-java.dirs 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/libjetty6-extra-java.dirs 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,4 +1,5 @@
usr/share/jetty6/lib/ext
usr/share/jetty6/lib/management
+usr/share/jetty6/lib/management/mx4j
usr/share/jetty6/lib/naming
-usr/share/jetty6/lib/plus
+usr/share/jetty6/lib/jsp-2.0
Modified: trunk/jetty6/debian/libjetty6-extra-java.install
===================================================================
--- trunk/jetty6/debian/libjetty6-extra-java.install 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/libjetty6-extra-java.install 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,6 +1,7 @@
lib/management/jetty-management-6*.jar usr/share/jetty6/lib/management
lib/naming/jetty-naming-6*.jar usr/share/jetty6/lib/naming
#lib/plus/jetty-plus-6*.jar usr/share/jetty6/lib/plus
+lib/ext/jetty-html-6*.jar usr/share/jetty6/lib/ext
lib/ext/jetty-servlet-tester-6*.jar usr/share/jetty6/lib/ext
lib/ext/jetty-ajp-6*.jar usr/share/jetty6/lib/ext
lib/ext/jetty-java5-threadpool-6*.jar usr/share/jetty6/lib/ext
Modified: trunk/jetty6/debian/libjetty6-extra-java.links
===================================================================
--- trunk/jetty6/debian/libjetty6-extra-java.links 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/libjetty6-extra-java.links 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,3 +1,15 @@
+usr/share/java/mx4j.jar usr/share/jetty6/lib/management/mx4j/mx4j.jar
+usr/share/java/mx4j-tools.jar usr/share/jetty6/lib/management/mx4j/mx4j-tools.jar
+usr/share/java/activation.jar usr/share/jetty6/lib/naming/activation.jar
+usr/share/java/gnumail.jar usr/share/jetty6/lib/naming/mail.jar
+usr/share/java/ant.jar usr/share/jetty6/lib/jsp-2.0/ant.jar
+usr/share/java/jasper.jar usr/share/jetty6/lib/jsp-2.0/jasper.jar
+usr/share/java/jasper-el.jar usr/share/jetty6/lib/jsp-2.0/commons-el.jar
+usr/share/java/jcl-over-slf4j.jar usr/share/jetty6/lib/jsp-2.0/jcl-over-slf4j.jar
+usr/share/java/slf4j-api.jar usr/share/jetty6/lib/jsp-2.0/slf4j-api.jar
+usr/share/java/slf4j-simple.jar usr/share/jetty6/lib/jsp-2.0/slf4j-simple.jar
+usr/share/java/xercesImpl.jar usr/share/jetty6/lib/jsp-2.0/xercesImpl.jar
+usr/share/java/xmlParserAPIs.jar usr/share/jetty6/lib/jsp-2.0/xmlParserAPIs.jar
usr/share/jetty6/lib/management/jetty-management-$VERSION.jar usr/share/java/jetty6-management.jar
usr/share/jetty6/lib/naming/jetty-naming-$VERSION.jar usr/share/java/jetty6-naming.jar
usr/share/jetty6/lib/ext/jetty-servlet-tester-$VERSION.jar usr/share/java/jetty6-servlet-tester.jar
Modified: trunk/jetty6/debian/libjetty6-java.dirs
===================================================================
--- trunk/jetty6/debian/libjetty6-java.dirs 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/libjetty6-java.dirs 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,4 +1,4 @@
usr/share/jetty6
usr/share/jetty6/lib
-usr/share/jetty6/lib/util5
-usr/share/jetty6/lib/sslengine
+usr/share/jetty6/lib/jre1.5
+usr/share/jetty6/lib/ext
Modified: trunk/jetty6/debian/libjetty6-java.install
===================================================================
--- trunk/jetty6/debian/libjetty6-java.install 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/libjetty6-java.install 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,5 +1,5 @@
lib/jetty-util-6*.jar usr/share/jetty6/lib
-lib/util5/jetty-util5-6*.jar usr/share/jetty6/lib/util5
+lib/util5/jetty-util5-6*.jar usr/share/jetty6/lib/jre1.5
lib/jetty-6*.jar usr/share/jetty6/lib
-lib/sslengine/jetty-sslengine-6*.jar usr/share/jetty6/lib/sslengine
+lib/sslengine/jetty-sslengine-6*.jar usr/share/jetty6/lib/ext
start.jar usr/share/jetty6
Modified: trunk/jetty6/debian/libjetty6-java.links
===================================================================
--- trunk/jetty6/debian/libjetty6-java.links 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/libjetty6-java.links 2009-06-14 00:02:49 UTC (rev 8489)
@@ -1,3 +1,4 @@
+usr/share/java/servlet-api-2.5.jar usr/share/jetty6/lib/servlet-api-2.5.jar
usr/share/jetty6/lib/jetty-util-$VERSION.jar usr/share/java/jetty6-util.jar
usr/share/jetty6/lib/util5/jetty-util5-$VERSION.jar usr/share/java/jetty6-util5.jar
usr/share/jetty6/lib/jetty-$VERSION.jar usr/share/java/jetty6.jar
Added: trunk/jetty6/debian/libjetty6-setuid-java.install
===================================================================
--- trunk/jetty6/debian/libjetty6-setuid-java.install (rev 0)
+++ trunk/jetty6/debian/libjetty6-setuid-java.install 2009-06-14 00:02:49 UTC (rev 8489)
@@ -0,0 +1,3 @@
+lib/ext/jetty-setuid-6*.jar usr/share/jetty6/lib/ext
+lib/ext/libsetuid.so usr/lib/jetty6
+
Added: trunk/jetty6/debian/libjetty6-setuid-java.links
===================================================================
--- trunk/jetty6/debian/libjetty6-setuid-java.links (rev 0)
+++ trunk/jetty6/debian/libjetty6-setuid-java.links 2009-06-14 00:02:49 UTC (rev 8489)
@@ -0,0 +1,2 @@
+usr/lib/jetty6/libsetuid.so usr/share/jetty6/lib/ext/libsetuid.so
+
Modified: trunk/jetty6/debian/module.xml
===================================================================
--- trunk/jetty6/debian/module.xml 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/module.xml 2009-06-14 00:02:49 UTC (rev 8489)
@@ -103,7 +103,7 @@
</target>
<target name="copy-to-etc" if="config.dir.exists">
- <echo>copying ${config.dir} to ${etc.dir} from ${module.name}</echo>
+ <echo>copying ${config.dir} to ${etc.dir} from ${module-name}</echo>
<copy todir="${etc.dir}">
<fileset dir="${config.dir}" excludes="**/*.svn"/>
</copy>
Modified: trunk/jetty6/debian/rules
===================================================================
--- trunk/jetty6/debian/rules 2009-06-13 20:16:57 UTC (rev 8488)
+++ trunk/jetty6/debian/rules 2009-06-14 00:02:49 UTC (rev 8489)
@@ -14,13 +14,27 @@
DEB_ANT_ARGS := -DVERSION=$(VERSION) -Dbuild.sysclasspath=last
#API_DOCS := javadoc/
-get-orig-source:
- uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
#binary-post-install/$(PACKAGE)::
# dh_install -p$(PACKAGE) build/$(PACKAGE)-$(VERSION).jar usr/share/java
# dh_link -p$(PACKAGE) usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar
+extras/setuid/modules/native/target/generated/org_mortbay_setuid_SetUID.c:
+ cd extras/setuid && install -D modules/native/src/main/native/org_mortbay_setuid_SetUID.c modules/native/target/generated/org_mortbay_setuid_SetUID.c
+
+extras/setuid/modules/native/target/generated/org_mortbay_setuid_SetUID.h: extras/setuid/modules/native/target/generated/org_mortbay_setuid_SetUID.c
+ cd extras/setuid && javah -d modules/native/target/generated -classpath ../../lib/ext/jetty-setuid-$(VERSION).jar org.mortbay.setuid.SetUID
+
+lib/ext/libsetuid.so: extras/setuid/modules/native/target/generated/org_mortbay_setuid_SetUID.h
+ cd extras/setuid && gcc -I$(JAVA_HOME)/include/ -I$(JAVA_HOME)/include/linux/ \
+ -shared modules/native/target/generated/org_mortbay_setuid_SetUID.c -fPIC -O \
+ -o ../../lib/ext/libsetuid.so
+
+build/lib$(PACKAGE)-setuid-java:: lib/ext/libsetuid.so
+
+get-orig-source:
+ uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
+
# No documentation released yet.
#binary-post-install/$(PACKAGE)-doc::
More information about the pkg-java-commits
mailing list