From 964fcc1e5405a27ea31e1b0ccdeabe7b69c4bd10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20Scha=CC=88fer?= Date: Thu, 22 Mar 2012 18:21:29 +0100 Subject: [PATCH] Added .gitignore file and debian directory --- .gitignore | 6 + debian/README.Debian | 6 + debian/changelog | 34 +++++ debian/compat | 1 + debian/control | 46 ++++++ debian/copyright | 62 ++++++++ debian/dirs | 2 + debian/helma1-docs.install | 3 + debian/helma1-swarm.docs | 1 + debian/helma1-swarm.install | 3 + debian/helma1.default | 18 +++ debian/helma1.dirs | 5 + debian/helma1.docs | 2 + debian/helma1.init | 191 ++++++++++++++++++++++++ debian/helma1.install | 7 + debian/helma1.links | 5 + debian/helma1.postinst | 49 ++++++ debian/patches/01_build_helmaswarm.diff | 24 +++ debian/rules | 40 +++++ 19 files changed, 505 insertions(+) create mode 100644 .gitignore create mode 100644 debian/README.Debian create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dirs create mode 100644 debian/helma1-docs.install create mode 100644 debian/helma1-swarm.docs create mode 100644 debian/helma1-swarm.install create mode 100644 debian/helma1.default create mode 100644 debian/helma1.dirs create mode 100644 debian/helma1.docs create mode 100644 debian/helma1.init create mode 100644 debian/helma1.install create mode 100644 debian/helma1.links create mode 100644 debian/helma1.postinst create mode 100644 debian/patches/01_build_helmaswarm.diff create mode 100755 debian/rules diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f83da782 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.* +apps +db/* +lib/ext +modules/ +server.properties diff --git a/debian/README.Debian b/debian/README.Debian new file mode 100644 index 00000000..22eb5743 --- /dev/null +++ b/debian/README.Debian @@ -0,0 +1,6 @@ +Helma for Debian +---------------- + + + + -- Hannes Wallnoefer Mon, 15 Dec 2008 11:04:41 +0100 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..562b13b9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,34 @@ +helma1 (1.7.0-1) intrepid; urgency=low + + * Update to final 1.7.0 release + + -- Hannes Wallnoefer Tue, 29 Sep 2009 10:12:35 +0200 + +helma1 (1.7.0-rc3-2) intrepid; urgency=low + + * Update build number to please launchpad build bots + + -- Hannes Wallnoefer Fri, 11 Sep 2009 16:15:46 +0200 + +helma1 (1.7.0-rc3-1) intrepid; urgency=low + + * Update to 1.7.0 release candidate 3 + * Add package for HelmaSwarm + + -- Hannes Wallnoefer Thu, 10 Sep 2009 16:43:12 +0200 + +helma1 (1.7+r9436-1) intrepid; urgency=low + + * Change java dependencies to include more options + * Move properties files to /etc/helma1/ so they are not overwritten + on updates. (Still have to figure out how to prompt the user for + how to handle modified files.) + + -- Hannes Wallnoefer Wed, 17 Dec 2008 11:00:00 +0100 + +helma1 (1.7+r9436) intrepid; urgency=low + + * Initial release + + -- Hannes Wallnoefer Tue, 16 Dec 2008 11:00:00 +0100 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7f8f011e --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..62b4b020 --- /dev/null +++ b/debian/control @@ -0,0 +1,46 @@ +Source: helma1 +Section: web +Priority: optional +Maintainer: Hannes Wallnoefer +Build-Depends: debhelper (>= 7), default-jdk, cdbs +Build-Depends-Indep: ant +Standards-Version: 3.7.3 +Homepage: http://www.helma.org/ + +Package: helma1 +Architecture: all +Depends: default-jre-headless | java2-runtime-headless | + java5-runtime-headless | sun-java5-jre | system-java, + jsvc, adduser, lsb-base (>= 3) +Description: A server-side JavaScript web application framework. + . + Helma is an open-source JavaScript framework written in Java. + It uses the Mozilla Rhino JavaScript engine to provide + a comprehensive framework for web application development. + +Package: helma1-swarm +Section: web +Architecture: all +Depends: helma1 (>= ${source:Version}) +Description: A cluster extension for the Helma web framework. + . + Helma is an open-source JavaScript framework written in Java. + It uses the Mozilla Rhino JavaScript engine to provide + a comprehensive framework for web application development. + . + This package contains HelmaSwarm, a cluster extension based + on JGroups. + +Package: helma1-docs +Section: doc +Architecture: all +Depends: helma1 (>= ${source:Version}) +Description: Online documentation for the Helma web framework. + . + Helma is an open-source JavaScript framework written in Java. + It uses the Mozilla Rhino JavaScript engine to provide + a comprehensive framework for web application development. + . + This package contains the online documentation, including Java + and JavaScript API documentation. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000..6dd9115c --- /dev/null +++ b/debian/copyright @@ -0,0 +1,62 @@ +This package was debianized by Hannes Wallnoefer on +Mon, 15 Dec 2008 11:04:41 +0100. + +It was downloaded from http://www.helma.org/ + +Upstream Authors: + + Hannes Wallnoefer + Robert Gaggl + Daniel Rutharth + Stefan Pollach + Tobias Schaefer + Manfred Andres + Juerg Lehni + +Copyright: 1999-2008 Helma Project. All rights reserved. + +License: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. Products derived from this software may not be called "Helma" + or "Hop", nor may "Helma" or "Hop" appear in their name, without + prior written permission of the Helma Project Group. For written + permission, please contact helma@helma.org. + + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE HELMA PROJECT OR ITS + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + + +Helma includes third party software released under different specific +license terms. See the licenses directory in the Helma distribution +for a list of these licenses. + +The Debian packaging is (C) 2008, Hannes Wallnoefer and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +Parts of Helma come with different licenses, see /usr/share/helma/licenses +for details. + + diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 00000000..ca882bbb --- /dev/null +++ b/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/debian/helma1-docs.install b/debian/helma1-docs.install new file mode 100644 index 00000000..e457a75c --- /dev/null +++ b/debian/helma1-docs.install @@ -0,0 +1,3 @@ +docs/api/ /usr/share/doc/helma1/api/ +docs/framework/ /usr/share/doc/helma1/framework/ + diff --git a/debian/helma1-swarm.docs b/debian/helma1-swarm.docs new file mode 100644 index 00000000..bacb12c8 --- /dev/null +++ b/debian/helma1-swarm.docs @@ -0,0 +1 @@ +helmaswarm/README.txt diff --git a/debian/helma1-swarm.install b/debian/helma1-swarm.install new file mode 100644 index 00000000..75388ca3 --- /dev/null +++ b/debian/helma1-swarm.install @@ -0,0 +1,3 @@ +helmaswarm/lib/*.jar /usr/share/helma1/lib/ext/ +helmaswarm/swarm.conf /etc/helma1/ + diff --git a/debian/helma1.default b/debian/helma1.default new file mode 100644 index 00000000..e8c98f8b --- /dev/null +++ b/debian/helma1.default @@ -0,0 +1,18 @@ +# Run Helma as this user ID. Not setting this or leaving it blank will use the +# default of helma1. +#HELMA_USER=helma1 + +# The home directory of the Java development kit (JDK). You need at least +# JDK version 1.5. If JAVA_HOME is not set, some common directories for +# OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried. +#JAVA_HOME=/usr/lib/jvm/java-6-openjdk + +# Directory for per-instance configuration files and webapps. It contains the +# directories conf, logs, webapps, work and temp. See RUNNING.txt for details. +# Default: /var/lib/helma1 +#HELMA_BASE=/var/lib/helma1 + +# Arguments to pass to the Java virtual machine (JVM). +#JAVA_OPTS="-Djava.awt.headless=true -Xmx128M" + + diff --git a/debian/helma1.dirs b/debian/helma1.dirs new file mode 100644 index 00000000..96eaf2f6 --- /dev/null +++ b/debian/helma1.dirs @@ -0,0 +1,5 @@ +var/log/helma1 +var/lib/helma1/apps +var/lib/helma1/db +etc/helma1 + diff --git a/debian/helma1.docs b/debian/helma1.docs new file mode 100644 index 00000000..c9f7a63d --- /dev/null +++ b/debian/helma1.docs @@ -0,0 +1,2 @@ +license.txt +README.txt diff --git a/debian/helma1.init b/debian/helma1.init new file mode 100644 index 00000000..f3f569a6 --- /dev/null +++ b/debian/helma1.init @@ -0,0 +1,191 @@ +#!/bin/sh +# +# /etc/init.d/helma1 -- startup script for the Helma web framework +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux by Ian Murdock . +# Modified for Tomcat by Stefan Gybas . +# Modified for Tomcat6 by Thierry Carrez . +# Modified for Helma by Hannes Wallnoefer . +# +### BEGIN INIT INFO +# Provides: helma1 +# Required-Start: $local_fs $remote_fs $network +# Required-Stop: $local_fs $remote_fs $network +# Should-Start: $named +# Should-Stop: $named +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +# Short-Description: Start Helma web application framework. +# Description: Start Helma web application framework. +### END INIT INFO + +set -e + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=helma1 +DESC="Helma web application framework" +DAEMON=/usr/bin/jsvc +HELMA_HOME=/usr/share/$NAME +DEFAULT=/etc/default/$NAME + +if [ `id -u` -ne 0 ]; then + echo "You need root privileges to run this script" + exit 1 +fi + +# Make sure helma is started with system locale +if [ -r /etc/default/locale ]; then + . /etc/default/locale + export LANG +fi + +. /lib/lsb/init-functions +. /etc/default/rcS + + +# The following variables can be overwritten in $DEFAULT + +# Run Helma as this user ID +HELMA_USER=helma1 + +# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not +# defined in $DEFAULT) +JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm" + +# Look for the right JVM to use +for jdir in $JDK_DIRS; do + if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then + JAVA_HOME="$jdir" + fi +done +export JAVA_HOME + +# Directory for per-instance configuration files and webapps +HELMA_BASE=/var/lib/$NAME + +# Default Java options +# Set java.awt.headless=true if JAVA_OPTS is not set so the +# Xalan XSL transformer can work without X11 display on JDK 1.4+ +# It also looks like the default heap size of 64M is not enough for most cases +# so the maximum heap size is set to 128M +if [ -z "$JAVA_OPTS" ]; then + JAVA_OPTS="-Djava.awt.headless=true -Xmx128M" +fi + +# End of variables that can be overwritten in $DEFAULT + +# overwrite settings from default file +if [ -f "$DEFAULT" ]; then + . "$DEFAULT" +fi + +if [ ! -f "$HELMA_HOME/launcher.jar" ]; then + log_failure_msg "$NAME is not installed" + exit 1 +fi + +if [ ! -f "$DAEMON" ]; then + log_failure_msg "missing $DAEMON" + exit 1 +fi + +# Set juli LogManager if logging.properties is provided +if [ -r "$HELMA_BASE"/logging.properties ]; then + JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$HELMA_BASE/logging.properties" +fi + +# Define other required variables +HELMA_PID="/var/run/$NAME.pid" +BOOTSTRAP_CLASS=helma.main.launcher.Main +JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$HELMA_HOME/launcher.jar" + +case "$1" in + start) + if [ -z "$JAVA_HOME" ]; then + log_failure_msg "no JDK found - please set JAVA_HOME" + exit 1 + fi + + if [ ! -d "$HELMA_BASE" ]; then + log_failure_msg "invalid HELMA_BASE: $HELMA_BASE" + exit 1 + fi + + log_daemon_msg "Starting $DESC" "$NAME" + if start-stop-daemon --test --start --pidfile "$HELMA_PID" \ + --user $HELMA_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + + cd "$HELMA_BASE" + + $DAEMON -user "$HELMA_USER" -cp "$JSVC_CLASSPATH" \ + -outfile SYSLOG -errfile SYSLOG \ + -pidfile "$HELMA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS" \ + -h "$HELMA_BASE" + + sleep 1 + if start-stop-daemon --test --start --pidfile "$HELMA_PID" \ + --user $HELMA_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + log_end_msg 1 + else + log_end_msg 0 + fi + else + log_progress_msg "(already running)" + log_end_msg 0 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if start-stop-daemon --test --start --pidfile "$HELMA_PID" \ + --user "$HELMA_USER" --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + log_progress_msg "(not running)" + else + $DAEMON -cp "$JSVC_CLASSPATH" -pidfile "$HELMA_PID" \ + -stop "$BOOTSTRAP_CLASS" + fi + log_end_msg 0 + ;; + status) + if start-stop-daemon --test --start --pidfile "$HELMA_PID" \ + --user $HELMA_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + + if [ -f "$HELMA_PID" ]; then + log_success_msg "$DESC is not running, but pid file exists." + exit 1 + else + log_success_msg "$DESC is not running." + exit 3 + fi + else + log_success_msg "$DESC is running with pid `cat $HELMA_PID`" + fi + ;; + restart|force-reload) + if start-stop-daemon --test --stop --pidfile "$HELMA_PID" \ + --user $HELMA_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + $0 stop + sleep 1 + fi + $0 start + ;; + try-restart) + if start-stop-daemon --test --start --pidfile "$HELMA_PID" \ + --user $HELMA_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + $0 start + fi + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}" + exit 1 + ;; +esac + +exit 0 + diff --git a/debian/helma1.install b/debian/helma1.install new file mode 100644 index 00000000..3f18c600 --- /dev/null +++ b/debian/helma1.install @@ -0,0 +1,7 @@ +launcher.jar /usr/share/helma1/ +lib/*.jar /usr/share/helma1/lib/ +licenses/ /usr/share/helma1/licenses/ +build/main/*.properties /etc/helma1/ +build/externals/modules/ /var/lib/helma1/ +build/externals/welcome/ /var/lib/helma1/apps/ +build/externals/manage/ /var/lib/helma1/apps/ diff --git a/debian/helma1.links b/debian/helma1.links new file mode 100644 index 00000000..fead9bc4 --- /dev/null +++ b/debian/helma1.links @@ -0,0 +1,5 @@ +/var/log/helma1 /var/lib/helma1/log +/etc/helma1/apps.properties /var/lib/helma1/apps.properties +/etc/helma1/server.properties /var/lib/helma1/server.properties +/etc/helma1/db.properties /var/lib/helma1/db.properties + diff --git a/debian/helma1.postinst b/debian/helma1.postinst new file mode 100644 index 00000000..7e03482a --- /dev/null +++ b/debian/helma1.postinst @@ -0,0 +1,49 @@ +#!/bin/sh +# postinst script for helma1 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + if ! id helma1 > /dev/null 2>&1 ; then + adduser --system --home /usr/share/helma1 --no-create-home \ + --group --disabled-password --shell /bin/false \ + helma1 + fi + chown -R helma1:adm /var/lib/helma1 + chown -R helma1:adm /var/log/helma1 + chmod 750 /var/log/helma1 + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/patches/01_build_helmaswarm.diff b/debian/patches/01_build_helmaswarm.diff new file mode 100644 index 00000000..744ac0f0 --- /dev/null +++ b/debian/patches/01_build_helmaswarm.diff @@ -0,0 +1,24 @@ +--- helma-clean/build.xml 2009-09-11 14:50:36.000000000 +0200 ++++ helma/build.xml 2009-09-11 15:00:23.000000000 +0200 +@@ -481,4 +481,14 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +--- helma-clean/helmaswarm/build.properties 2009-09-11 19:47:13.000000000 +0200 ++++ helma/helmaswarm/build.properties 2009-09-11 19:50:29.000000000 +0200 +@@ -1,3 +1,3 @@ + # build properties for helmaswarm + +-helma.install.dir=../helma ++helma.install.dir=../ diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..e9b4a722 --- /dev/null +++ b/debian/rules @@ -0,0 +1,40 @@ +#!/usr/bin/make -f +# debian/rules for helma1 (uses CDBS) + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/ant.mk +#include /usr/share/cdbs/1/rules/dpatch.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +JAVA_HOME := /usr/lib/jvm/default-java +DEB_ANT_BUILD_TARGET := jar javadocs jsdocs package-apps swarm-jar +DEB_ANT_CLEAN_TARGET := clean swarm-clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + +binary-indep: build install + dh_testdir + dh_testroot + dh_installinit --error-handler=true -- start 90 2 3 4 5 . stop 10 1 . + dh_install --exclude=.bat + dh_installdocs + dh_installdebconf + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: build install + +binary: binary-indep binary-arch +