Index: debian_installer/README =================================================================== diff -u --- debian_installer/README (revision 0) +++ debian_installer/README (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,57 @@ +Debian Packaging +================ + +Steps for doing a full rebuild of debianised lams2 and jboss4 packages. + + +Prerequisites +------------- + * a Debian or Debian based system + * packages: + * dh_make + * dpkg-dev + * debconf + * debhelper + * for lams2: + * a copy of lams.ear + * a dump of the lams database + * a copy of lams_build/conf/unix/jboss/ directory + + +Instructions - lams-jboss4 +-------------------------- +1. download jboss-4.0.2.zip +2. unzip the contents to /path/to/packaging/ +4. cd /path/to/packaging/ +5. mv jboss-4.0.2 lams-jboss4-4.0.2 +6. cd lams-jboss4-4.0.2 +7. dh_make --createorig +8. answer the wizard questions (choose the first or default options) +9. rm -rf debian +10. copy the debian folder from this cvs project into the current directory +11. sudo dpkg-buildpackage -S -sa (add '-kxxxxxxxx' if you have a gpg key to sign + it) - this will create a source package in the parent folder +12. sudo dpkg-buildpackage -b (add '-kxxxxxxxx' if you want to sign it) - this + will create the binary .deb in the parent folder + + +Instructions - lams2 +-------------------- +1. checkout/export lams_* projects as normal (use the project alias 'all') +2. set lams_build to 'unix', and the path to your jboss folder +3. create the lams database and lams/lamsdemo user with access to it +4. do a full build (ant rebuild-db; ant assemble-ear; ant deploy-ear; + ant deploy-tools; ant copyfiles) +5. cd /path/to/packaging/ +6. mkdir lams2-2.1rc1 (adjust the version as necessary) +7. cd lams2-2.1rc1 +8. cp -pr /path/to/jboss-4.0.2/server/default/deploy/lams.ear/ . +9. cp -pr /path/to/lams_build/conf/unix/jboss/ . +10. copy index.html and lams2.cnf from this cvs project into the current directory +11. dh_make --createorig +12. rm -rf debian +13. copy the debian folder from this cvs project into the current directory +14. sudo dpkg-buildpackage -S -sa (add '-kxxxxxxxx' if you have a gpg key to sign + it) - this will create a source package in the parent folder +15. sudo dpkg-buildpackage -b (add '-kxxxxxxxx' if you want to sign it) - this + will create the binary .deb in the parent folder \ No newline at end of file Index: debian_installer/lams-jboss4-4.0.2/debian/changelog =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/changelog (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/changelog (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,6 @@ +lams-jboss4 (4.0.2-1) unstable; urgency=low + + * Initial release + + -- Jun-Dir Liew Thu, 27 Mar 2008 11:44:53 +1100 + Index: debian_installer/lams-jboss4-4.0.2/debian/compat =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/compat (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/compat (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1 @@ +5 Index: debian_installer/lams-jboss4-4.0.2/debian/control =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/control (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/control (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,13 @@ +Source: lams-jboss4 +Section: contrib/web +Priority: extra +Maintainer: LAMS Development Team +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: lams-jboss4 +Architecture: any +Depends: java2-runtime, java-compiler +Description: JBoss 4.0 Application Server + This version is the recommended version for use with + LAMS 2. Index: debian_installer/lams-jboss4-4.0.2/debian/copyright =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/copyright (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/copyright (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,28 @@ +This package was debianized by LAMS Development Team +on Thu, 27 Mar 2008 11:44:53 +1100. + +It was downloaded from + +License: + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + On Debian GNU/Linux systems, the complete text of the GNU Lesser General + Public License can be found in `/usr/share/common-licenses/LGPL'. + +The Debian packaging is (C) 2008, Jun-Dir Liew and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + +Further licenses used by jboss are listed under the docs/licenses folder. Index: debian_installer/lams-jboss4-4.0.2/debian/files =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/files (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/files (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1 @@ +lams-jboss4_4.0.2-1_i386.deb contrib/web extra Index: debian_installer/lams-jboss4-4.0.2/debian/lams-jboss4.install =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/lams-jboss4.install (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/lams-jboss4.install (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,5 @@ +bin/* /usr/share/jboss-4.0.2/bin +client/* /usr/share/jboss-4.0.2/client +docs/* /usr/share/jboss-4.0.2/docs +lib/* /usr/share/jboss-4.0.2/lib +server/* /usr/share/jboss-4.0.2/server Index: debian_installer/lams-jboss4-4.0.2/debian/postinst =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/postinst (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/postinst (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,69 @@ +#!/bin/sh +# postinst script for lams-jboss4 +# +# 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) + # Store variable data under /var + mkdir -p /var/cache/jboss + mkdir -p /var/cache/jboss/data + mkdir -p /var/cache/jboss/tmp + mkdir -p /var/cache/jboss/work + mkdir -p /var/log/jboss + cd /usr/share/jboss-4.0.2/server/default + ln -s /var/cache/jboss/data data + ln -s /var/cache/jboss/tmp tmp + ln -s /var/cache/jboss/work work + ln -s /var/log/jboss log + + # Make scripts executable + cd /usr/share/jboss-4.0.2/bin + chmod 755 *.sh + + # Configure Xmx etc in run.conf + sed -i -e "s/Xmx128m/Xmx512m -XX:MaxPermSize=256m/" /usr/share/jboss-4.0.2/bin/run.conf + if [ -z $JAVA_HOME ] + then + t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t + t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t + fi + echo "JAVA_HOME=$t" >> /usr/share/jboss-4.0.2/bin/run.conf + + # Remove jmx and management consoles + cd /usr/share/jboss-4.0.2/server/default/deploy/ && rm -rf jmx-console.war + cd /usr/share/jboss-4.0.2/server/default/deploy/ && rm -rf management + ;; + + 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 + + Index: debian_installer/lams-jboss4-4.0.2/debian/postrm =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/postrm (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/postrm (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,43 @@ +#!/bin/sh +# postrm script for lams-jboss4 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove) + ;; + purge) + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm 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 + + Index: debian_installer/lams-jboss4-4.0.2/debian/prerm =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/prerm (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/prerm (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,49 @@ +#!/bin/sh +# prerm script for blah +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove) + rm -f /usr/share/jboss-4.0.2/server/default/data + rm -f /usr/share/jboss-4.0.2/server/default/tmp + rm -f /usr/share/jboss-4.0.2/server/default/work + rm -f /usr/share/jboss-4.0.2/server/default/log + rm -rf /var/cache/jboss/ + rm -rf /var/log/jboss/ + ;; + + upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm 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 + + Index: debian_installer/lams-jboss4-4.0.2/debian/rules =================================================================== diff -u --- debian_installer/lams-jboss4-4.0.2/debian/rules (revision 0) +++ debian_installer/lams-jboss4-4.0.2/debian/rules (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,27 @@ +#!/usr/bin/make -f + +build: + +clean: + dh_testdir + dh_testroot + + dh_clean + +binary-indep: build + +binary-arch: build + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_install + dh_installdebconf + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary Index: debian_installer/lams2-2.1rc1/debian/changelog =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/changelog (revision 0) +++ debian_installer/lams2-2.1rc1/debian/changelog (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,6 @@ +lams2 (2.1rc1-1) unstable; urgency=low + + * Initial release + + -- LAMS Development Team Thu, 27 Mar 2008 16:12:04 +1100 + Index: debian_installer/lams2-2.1rc1/debian/compat =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/compat (revision 0) +++ debian_installer/lams2-2.1rc1/debian/compat (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1 @@ +5 Index: debian_installer/lams2-2.1rc1/debian/config =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/config (revision 0) +++ debian_installer/lams2-2.1rc1/debian/config (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,14 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule + +db_input critical lams2/db_root_pass || true +#db_input critical lams2/db_name || true +#db_input critical lams2/db_user || true +#db_input critical lams2/db_pass || true +db_input critical lams2/server_host || true +db_input critical lams2/server_port || true +db_input critical lams2/sysadmin_user || true +db_input critical lams2/sysadmin_pass || true + +db_go Index: debian_installer/lams2-2.1rc1/debian/control =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/control (revision 0) +++ debian_installer/lams2-2.1rc1/debian/control (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,19 @@ +Source: lams2 +Section: contrib/web +Priority: extra +Maintainer: LAMS Development Team +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: lams2 +Architecture: any +Depends: sun-java5-jdk|sun-java6-jdk, lams-jboss4 (>=4.0.2), debconf (>=0.5), mysql-server-5.0, mysql-client, adduser +Replaces: lams-jboss4 +Description: Learning Activity Management System (LAMS) 2 + LAMS is a revolutionary new tool for designing, managing + and delivering online collaborative learning activities. + It provides teachers with a highly intuitive visual + authoring environment for creating sequences of learning + activities. These activities can include a range of + individual tasks, small group work and whole class + activities based on both content and collaboration. Index: debian_installer/lams2-2.1rc1/debian/copyright =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/copyright (revision 0) +++ debian_installer/lams2-2.1rc1/debian/copyright (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,83 @@ +This package was debianized by the LAMS Development Team + on Thu, 27 Mar 2008 16:12:04 +1100. + +It was downloaded from http://wiki.lamsfoundation.org/display/lams/Building+LAMS + +Copyright (C) 2002-2008 LAMS Foundation + +LAMS 2 is released under the GPL license detailed below. This package +also includes other libraries/packages, whose respective licenses are +detailed below. + +On Debian systems, the complete text of the GNU General Public License can be +found in the file '/usr/share/common-licenses/GPL'. + +Library/Package License +-------------------------------------------------------------------------------- +antlr.jar Antlr 3 License +axis-ant.jar Apache License 2.0 +axis.jar Apache License 2.0 +cglib-nodep-2.1_2.jar Apache License 2.0 +cglib_jboss404GA.jar Apache License 2.0 +commons-beanutils.jar Apache License 2.0 +commons-codec-1.3.jar Apache License 2.0 +commons-collections.jar Apache License 2.0 +commons-digester.jar Apache License 2.0 +commons-discovery-0.2.jar Apache Software License 1.1 +commons-fileupload.jar Apache Software License 1.1 +commons-lang-2.0.jar Apache Software License 1.1 +commons-logging.jar Apache License 2.0 +commons-validator.jar Apache License 2.0 +FCKeditor-2.3.jar CDL Closed Distribution License +gnujaxp.jar GNU General Public License +hibernate3.jar GNU General Public License +jakarta-oro.jar Apache Software License 1.1 +jaxrpc.jar CDDL (Common Development and + Distribution License 1.0) +jcommon-1.0.0.jar GNU Lesser General Public Licence +jdom.jar Jdom Jar License +jfreechart-1.0.1.jar GNU Lesser General Public Licence +jgroups.jar GNU Lesser General Public Licence +jmock-2003-03-19.jar jMock Project License +joda-time-0.98.jar Joda Software License 1.0 +jsMath Apache License 2.0 +jstl.jar JSTL License 1.1 +log4j-1.2.13.jar Apache Software License 1.1 +mysql-connector- (CDDL Common Development and + java-3.1.12-bin-jar Distribution License 1.0) +odmg-3.0.jar ODMG 2.0 +poi-2.5.1-final Apache Software License 1.1 + -20040804.jar +quartz.jar Apache License 2.0 +saaj.jar (CDDL Common Development and + Distribution License 1.0) +smack.jar Apache License 2.0 +smackx.jar Apache License 2.0 +spring.jar Apache License 2.0 +standard.jar Apache License 2.0 +struts-el.jar Apache License 2.0 +struts.jar Apache License 2.0 +wddx.jar GNU General Public License +wsdl4j-1.5.1.jar CPL Common Public License 0.5 +xml-writer-0.2.jar XML-Write License +xom-1.0.b3.jar GNU Lesser General Public License +xpp3-1.1.3.4d_b4.jar XPP3 License +xstream-1.1.jar xstream Licanse + +SHARE RECOURCES LIBRARY LICENSES +castor-0.9.5.3-xml.jar Castor License +jdom.jar Jdom Jar License +moonunitsrc.jar Reload License +reload-diva.jar Reload License +reload-editor.jar Reload License +reload-jdom.jar Reload License +reload-moonunit.jar Reload License +xercesImpl.jar Apache Software License 1.1 +xml-apis.jar Apache Software License 1.1 +jaxen-full.jar Jaxen Jar License (The Werken + Company) +sax.jar Public Domain +saxpath.jar Jaxen Jar License (The Werken + Company) +-------------------------------------------------------------------------------- + Index: debian_installer/lams2-2.1rc1/debian/dirs =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/dirs (revision 0) +++ debian_installer/lams2-2.1rc1/debian/dirs (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1 @@ +var/lib/lams Index: debian_installer/lams2-2.1rc1/debian/files =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/files (revision 0) +++ debian_installer/lams2-2.1rc1/debian/files (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1 @@ +lams2_2.1rc1-1_i386.deb contrib/web extra Index: debian_installer/lams2-2.1rc1/debian/lams2.init =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/lams2.init (revision 0) +++ debian_installer/lams2-2.1rc1/debian/lams2.init (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,122 @@ +#!/bin/sh +# +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# + +# Attempt to locate JAVA_HOME, code borrowed from jabref package +if [ -z $JAVA_HOME ] +then + t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && export JAVA_HOME=$t + t=/usr/lib/jvm/java-6-sun && test -d $t && export JAVA_HOME=$t +fi + +PATH=/sbin:/bin:/usr/sbin:/usr/bin:${JAVA_HOME}/bin +JAVA=${JAVA_HOME}/bin/java +JBOSS_HOME=/usr/share/jboss-4.0.2 +NAME=lams2 +DESC="LAMS 2 Server" + +test -x $JAVA || exit 0 + +# Read an optional running configuration file +if [ "x$RUN_CONF" = "x" ]; then + RUN_CONF="${JBOSS_HOME}/bin/run.conf" +fi +if [ -r "$RUN_CONF" ]; then + . "$RUN_CONF" +fi + +JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME" + +# Setup the java endorsed dirs +JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed" + +# Setup the classpath +runjar="$JBOSS_HOME/bin/run.jar" +if [ ! -f "$runjar" ]; then + die "Missing required file: $runjar" +fi +JBOSS_BOOT_CLASSPATH="$runjar" + +# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK +# compatible distribution which JAVA_HOME points to +if [ "x$JAVAC_JAR" = "x" ]; then + JAVAC_JAR="$JAVA_HOME/lib/tools.jar" +fi + +if [ "x$JBOSS_CLASSPATH" = "x" ]; then + JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR" +else + JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR" +fi + + +DAEMON_OPTS="$JAVA_OPTS \ + -Djava.endorsed.dirs=$JBOSS_ENDORSED_DIRS \ + -classpath $JBOSS_CLASSPATH \ + org.jboss.Main" + + +#set -e + +start() { + start-stop-daemon --start --quiet --background --make-pidfile \ + --pidfile /var/run/$NAME.pid --chuid lams:lams \ + --exec $JAVA -- $DAEMON_OPTS + +} + +stop() { + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid + +} + +case "$1" in + start) + echo "Starting $DESC: " + start + ;; + stop) + echo "Stopping $DESC: " + stop + ;; + status) + if [ -e /var/run/$NAME.pid ]; then + if [ -r /var/run/$NAME.pid ]; then + pid=`cat /var/run/"$NAME".pid` + if [ "X$pid" = "X" ]; then + echo "$DESC is not running." + exit 1 + else + echo "$DESC is running ($pid)." + exit 0 + fi + fi + fi + ;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo -n "Restarting $DESC: " + #set +e + stop + #set -e + sleep 10 + start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 + Index: debian_installer/lams2-2.1rc1/debian/lams2.install =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/lams2.install (revision 0) +++ debian_installer/lams2-2.1rc1/debian/lams2.install (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,15 @@ +jboss/jboss-service.xml /usr/share/jboss-4.0.2/server/default/conf/ +jboss/log4j.xml /usr/share/jboss-4.0.2/server/default/conf/ +jboss/login-config.xml /usr/share/jboss-4.0.2/server/default/conf/ +jboss/service/local-service.xml /usr/share/jboss-4.0.2/server/default/deploy/ +jboss/service/mysql-ds.xml /usr/share/jboss-4.0.2/server/default/deploy/ +jboss/tomcat/context.xml /usr/share/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/ +jboss/tomcat/jboss-service.xml /usr/share/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/META-INF/ +jboss/tomcat/server.xml /usr/share/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/ +jboss/tomcat/web.xml /usr/share/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/conf/ +lams.ear /usr/share/jboss-4.0.2/server/default/deploy/ +lams.ear/lams-session.jar /usr/share/jboss-4.0.2/server/default/lib/ +lams.ear/lams-valve.jar /usr/share/jboss-4.0.2/server/default/lib/ +lams.sql /usr/share/jboss-4.0.2/server/default/ +lams2.cnf /etc/mysql/conf.d/ +index.html /usr/share/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/ROOT.war/ Index: debian_installer/lams2-2.1rc1/debian/lams2.postinst.debhelper =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/lams2.postinst.debhelper (revision 0) +++ debian_installer/lams2-2.1rc1/debian/lams2.postinst.debhelper (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,10 @@ +# Automatically added by dh_installinit +if [ -x "/etc/init.d/lams2" ]; then + update-rc.d lams2 defaults >/dev/null + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d lams2 start || exit $? + else + /etc/init.d/lams2 start || exit $? + fi +fi +# End automatically added section Index: debian_installer/lams2-2.1rc1/debian/lams2.postrm.debhelper =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/lams2.postrm.debhelper (revision 0) +++ debian_installer/lams2-2.1rc1/debian/lams2.postrm.debhelper (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,11 @@ +# Automatically added by dh_installdebconf +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +# End automatically added section +# Automatically added by dh_installinit +if [ "$1" = "purge" ] ; then + update-rc.d lams2 remove >/dev/null || exit $? +fi +# End automatically added section Index: debian_installer/lams2-2.1rc1/debian/lams2.prerm.debhelper =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/lams2.prerm.debhelper (revision 0) +++ debian_installer/lams2-2.1rc1/debian/lams2.prerm.debhelper (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,9 @@ +# Automatically added by dh_installinit +if [ -x "/etc/init.d/lams2" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d lams2 stop || exit $? + else + /etc/init.d/lams2 stop || exit $? + fi +fi +# End automatically added section Index: debian_installer/lams2-2.1rc1/debian/lams2.substvars =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/lams2.substvars (revision 0) +++ debian_installer/lams2-2.1rc1/debian/lams2.substvars (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1 @@ +misc:Depends=debconf (>= 0.5) | debconf-2.0 Index: debian_installer/lams2-2.1rc1/debian/postinst =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/postinst (revision 0) +++ debian_installer/lams2-2.1rc1/debian/postinst (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,188 @@ +#!/bin/sh +# postinst script for lams2 +# +# 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) + . /usr/share/debconf/confmodule + + db_get lams2/db_root_pass + db_root_pass="$RET" + + #db_get lams2/db_name + #db_name="$RET" + db_name="lams" + + #db_get lams2/db_user + #db_user="$RET" + db_user="lams" + + #db_get lams2/db_pass + #db_pass="$RET" + db_pass="lamsdbpasswd" + + db_get lams2/server_host + server_host="$RET" + + db_get lams2/server_port + server_port="$RET" + + db_get lams2/sysadmin_user + sysadmin_user="$RET" + + db_get lams2/sysadmin_pass + sysadmin_pass="$RET" + + db_stop + + # Configure database access in mysql-ds.xml + cd /usr/share/jboss-4.0.2/server/default/deploy/ + sed -i -e "s/\(\).*\(<\/connection-url>\)/\1jdbc:mysql:\/\/localhost:3306\/$db_name\2/" mysql-ds.xml + sed -i -e "s/\(\).*\(<\/user-name>\)/\1$db_user\2/" mysql-ds.xml + sed -i -e "s/\(\).*\(<\/password>\)/\1$db_pass\2/" mysql-ds.xml + + # Configure port in server.xml + cd /usr/share/jboss-4.0.2/server/default/deploy/jbossweb-tomcat55.sar/ + sed -i -e "s/port=\"8080\"/port=\"$server_port\"/" server.xml + + # Assemble a ServerURL + server_url="http://$server_host:$server_port/lams/" + + if [ "$db_root_pass" != "" ] ; then + # Check if db exists + if [ ! -d /var/lib/mysql/lams/ ] ; then + mysql -e "create database $db_name default charset utf8;" \ + -u root -p$db_root_pass || true + mysql -e "grant all privileges on $db_name.* to $db_user@localhost identified by '$db_pass';" \ + -u root -p$db_root_pass || true + mysql -e "revoke process,super on *.* from $db_user@localhost;" -u root -p$db_root_pass || true + mysql $db_name < /usr/share/jboss-4.0.2/server/default/lams.sql -u root -p$db_root_pass || true + fi + # Configure ServerURL and admin username/password + mysql $db_name -e "update lams_configuration \ + set config_value='$server_url' where config_key='ServerURL'" \ + -u root -p$db_root_pass || true + mysql $db_name -e "update lams_configuration \ + set config_value='/usr/share/jboss-4.0.2/server/default/deploy/lams.ear/' \ + where config_key='EARDir'" \ + -u root -p$db_root_pass || true + mysql $db_name -e "update lams_user \ + set login='$sysadmin_user' \ + where user_id=1" \ + -u root -p$db_root_pass || true + mysql $db_name -e "update lams_user \ + set password=sha1('$sysadmin_pass') \ + where user_id=1" \ + -u root -p$db_root_pass || true + mysql $db_name -e "update lams_configuration \ + set config_value='/var/lib/lams/repository' \ + where config_key='ContentRepositoryPath'" \ + -u root -p$db_root_pass || true + mysql $db_name -e "update lams_configuration \ + set config_value='/var/lib/lams/dump' \ + where config_key='DumpDir'" \ + -u root -p$db_root_pass || true + mysql $db_name -e "update lams_configuration \ + set config_value='/var/lib/lams/temp' \ + where config_key='TempDir'" \ + -u root -p$db_root_pass || true + else + if [ ! -d /var/lib/mysql/lams/ ] ; then + mysql -e "create database $db_name default charset utf8;" -u root || true + mysql -e "grant all privileges on $db_name.* to $db_user@localhost identified by '$db_pass';" \ + -u root || true + mysql -e "revoke process,super on *.* from $db_user@localhost;" -u root || true + mysql $db_name < /usr/share/jboss-4.0.2/server/default/lams.sql -u root || true + fi + # Configure ServerURL and admin username/password + mysql $db_name -e "update lams_configuration \ + set config_value='$server_url' \ + where config_key='ServerURL'" \ + -u root || true + mysql $db_name -e "update lams_configuration \ + set config_value='/usr/share/jboss-4.0.2/server/default/deploy/lams.ear/' \ + where config_key='EARDir'" \ + -u root || true + mysql $db_name -e "update lams_user \ + set login='$sysadmin_user' \ + where user_id=1" \ + -u root || true + mysql $db_name -e "update lams_user \ + set password=sha1('$sysadmin_pass') \ + where user_id=1" \ + -u root || true + mysql $db_name -e "update lams_configuration \ + set config_value='/var/lib/lams/repository' \ + where config_key='ContentRepositoryPath'" \ + -u root || true + mysql $db_name -e "update lams_configuration \ + set config_value='/var/lib/lams/dump' \ + where config_key='DumpDir'" \ + -u root || true + mysql $db_name -e "update lams_configuration \ + set config_value='/var/lib/lams/temp' \ + where config_key='TempDir'" \ + -u root || true + fi + + # Copy caching jars + cd /usr/share/jboss-4.0.2/server/ + cp all/lib/jgroups.jar default/lib/ + cp all/lib/jboss-cache.jar default/lib/ + + # Place lams-www.war (uploaded data) in /var/lib + cd /usr/share/jboss-4.0.2/server/default/deploy/lams.ear/ + if [ ! -d /var/lib/lams/ ] ; then + mkdir -p /var/lib/lams/ + fi + mv lams-www.war /var/lib/lams/ + ln -s /var/lib/lams/lams-www.war + + # Add user and group + adduser --system --group --no-create-home lams 2> /dev/null + chown -L -R lams:lams /usr/share/jboss-4.0.2/ + chown -R lams:lams /var/lib/lams/ + + # Restart MySQL so tx-isolation=READ-COMMITTED takes effect + if [ -x "/etc/init.d/mysql" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d mysql restart || exit $? + else + /etc/init.d/mysql restart || exit $? + fi + fi + ;; + + 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 + + Index: debian_installer/lams2-2.1rc1/debian/postrm =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/postrm (revision 0) +++ debian_installer/lams2-2.1rc1/debian/postrm (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,73 @@ +#!/bin/sh +# postrm script for lams2 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +. /usr/share/debconf/confmodule +db_get lams2/db_root_pass +db_root_pass="$RET" + +case "$1" in + remove) + # Remove the caching jars + rm -f /usr/share/jboss-4.0.2/server/default/lib/jgroups.jar + rm -f /usr/share/jboss-4.0.2/server/default/lib/jboss-cache.jar + + # Remove user and group + deluser lams 2> /dev/null || true + + # Remove the database user + if [ "$db_root_pass" != "" ] ; then + mysql -e "drop user lams@localhost" -u root -p$db_root_pass || true + else + mysql -e "drop user lams@localhost" -u root || true + fi + ;; + + purge) + # Remove contents of lams.ear + rm -rf /usr/share/jboss-4.0.2/server/default/deploy/lams.ear/ + + # Remove variable data + rm -rf /var/lib/lams/ + + # Drop the database + if [ "$db_root_pass" != "" ] ; then + mysql -e "drop database if exists lams" -u lams -plamsdbpasswd || true + else + mysql -e "drop database if exists lams" -u lams || true + fi + ;; + + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm 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 + + Index: debian_installer/lams2-2.1rc1/debian/preinst =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/preinst (revision 0) +++ debian_installer/lams2-2.1rc1/debian/preinst (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,37 @@ +#!/bin/sh +# preinst script for lams2 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install) + ;; + + upgrade|abort-upgrade) + ;; + + *) + echo "preinst 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 + + Index: debian_installer/lams2-2.1rc1/debian/prerm =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/prerm (revision 0) +++ debian_installer/lams2-2.1rc1/debian/prerm (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,40 @@ +#!/bin/sh +# prerm script for lams2 +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm 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 + + Index: debian_installer/lams2-2.1rc1/debian/rules =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/rules (revision 0) +++ debian_installer/lams2-2.1rc1/debian/rules (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,32 @@ +#!/usr/bin/make -f + +build: + dh_testdir + +clean: + dh_testdir + dh_testroot + dh_clean + +binary-indep: build + +binary-arch: build + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_install + dh_installdebconf + dh_installinit + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary Index: debian_installer/lams2-2.1rc1/debian/templates =================================================================== diff -u --- debian_installer/lams2-2.1rc1/debian/templates (revision 0) +++ debian_installer/lams2-2.1rc1/debian/templates (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,49 @@ +Template: lams2/db_root_pass +Type: password +Description: Enter your MySQL root password: + Your MySQL root password will be used to create a database and MySQL user for + LAMS. + +Template: lams2/db_name +Type: string +Default: lams +Description: Enter a name for LAMS' database: + Select a name for LAMS' MySQL database. + +Template: lams2/db_user +Type: string +Default: lams +Description: Enter a name for LAMS' MySQL user: + Select a name for LAMS' MySQL user. + +Template: lams2/db_pass +Type: password +Description: Enter a password for LAMS' MySQL user: + +Template: lams2/server_host +Type: string +Default: localhost +Description: Enter the domain name or IP addres for your LAMS server: + This is used to construct links and callbacks used by LAMS - it is mandatory + for LAMS to be fully functional. If possible, enter the value that + users will put in their browsers when accessing LAMS (i.e. not an + internal-only address). + +Template: lams2/server_port +Type: string +Default: 8080 +Description: Enter the port for your LAMS server: + This is the port that the JBoss server used by LAMS will listen on. It shouldn't + be used by any other server on your system. + +Template: lams2/sysadmin_user +Type: string +Default: sysadmin +Description: Enter the username for your admin user: + This user will have the Sys Admin role and have full control. + +Template: lams2/sysadmin_pass +Type: password +Default: sysadmin +Description: Enter the password for your admin user: + The password for your admin user. Must not be blank. Index: debian_installer/lams2-2.1rc1/index.html =================================================================== diff -u --- debian_installer/lams2-2.1rc1/index.html (revision 0) +++ debian_installer/lams2-2.1rc1/index.html (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,9 @@ + + + + + + + + + Index: debian_installer/lams2-2.1rc1/lams2.cnf =================================================================== diff -u --- debian_installer/lams2-2.1rc1/lams2.cnf (revision 0) +++ debian_installer/lams2-2.1rc1/lams2.cnf (revision 209fecfc461929b9929daf15f33234efff6c8567) @@ -0,0 +1,2 @@ +[mysqld] +transaction-isolation = READ-COMMITTED