=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl 2011-10-28 12:24:59 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/resources/transform/gml2dxf.xsl 2013-05-28 12:06:12 +0000
@@ -38,7 +38,7 @@
0
-
+
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/exp/ExportDataMartAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/exp/ExportDataMartAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/exp/ExportDataMartAction.java 2013-05-28 12:06:12 +0000
@@ -65,6 +65,9 @@
// TODO: experiment with different sizes for this to stop data dribbling out
private static final int GZIPBUFFER = 8192;
+ // dummy figure to keep legacy mydatamart happy
+ private static final int DUMMYCOUNT = 100000;
+
private static final Log log = LogFactory.getLog( ExportDataMartAction.class );
private static final DateFormat dateFormat = new SimpleDateFormat( "yyyyMMdd" );
@@ -233,8 +236,12 @@
OutputStream out = null;
// how many rows do we expect
- int count = exportPivotViewService.count( requestType, pType, start, end, dataSourceLevel, dataSourceRoot );
-
+ // int count = exportPivotViewService.count( requestType, pType, start, end, dataSourceLevel, dataSourceRoot );
+
+ // Turns out it is too expensive to count the size of the resultset on large datamarts
+ // so we just return a dummy value here
+ int count = DUMMYCOUNT;
+
ContextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_GZIP, true, filename, true );
// write number of rows to custom header
=== added directory 'tools/dhis2-tools-deb'
=== added file 'tools/dhis2-tools-deb/.bzrignore'
--- tools/dhis2-tools-deb/.bzrignore 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/.bzrignore 2013-05-28 12:06:12 +0000
@@ -0,0 +1,2 @@
+*.deb
+*~
=== added file 'tools/dhis2-tools-deb/Makefile'
--- tools/dhis2-tools-deb/Makefile 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/Makefile 2013-05-28 12:06:12 +0000
@@ -0,0 +1,17 @@
+TARGET=dhis2-tools_1.0-0ubuntu1_all.deb
+
+all: deb test
+
+deb: doc
+ ./assemble.sh $(TARGET)
+
+doc:
+ cd docs; make; cd ..
+
+test:
+ lintian $(TARGET)
+
+clean:
+ rm -f $(TARGET)
+ rm -rf *~
+ cd docs; make clean; cd ..
=== added file 'tools/dhis2-tools-deb/assemble.sh'
--- tools/dhis2-tools-deb/assemble.sh 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/assemble.sh 2013-05-28 12:06:12 +0000
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+cd ./pkg
+find . -iname *~ -exec rm '{}' ';'
+find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums
+chmod 644 DEBIAN/md5sums
+cd ..
+
+fakeroot dpkg -b ./pkg $1
+
=== added directory 'tools/dhis2-tools-deb/docs'
=== added file 'tools/dhis2-tools-deb/docs/Makefile'
--- tools/dhis2-tools-deb/docs/Makefile 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/docs/Makefile 2013-05-28 12:06:12 +0000
@@ -0,0 +1,8 @@
+man: manual.xml
+ docbook2x-man manual.xml
+ gzip -f -9 *.1
+ cp -f *.1.gz ../pkg/usr/share/man/man1
+ chmod 0644 ../pkg/usr/share/man/man1/*
+
+clean:
+ rm -f *.gz
=== added file 'tools/dhis2-tools-deb/docs/manual.xml'
--- tools/dhis2-tools-deb/docs/manual.xml 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/docs/manual.xml 2013-05-28 12:06:12 +0000
@@ -0,0 +1,203 @@
+
+
+
+
+ DHIS2 server tools manual
+
+ Bob
+ Jolliffe
+
+
+
+
+ Overview
+ Installing and managing DHIS2.
+
+
+
+ DHIS2 tools
+
+
+
+
+ dhis2-instance-create
+ 1
+
+
+ dhis2-instance-create
+ Creates a new dhis2 instance
+
+
+
+
+ /usr/bin/dhis2-instance-create
+
+
+
+ name
+
+
+
+
+ Description
+ Use this tool to create a new dhis2 instance in a tomcat container.
+
+
+ OPTIONS
+
+
+ -p
+ http port
+
+
+
+
+ Examples
+ Create it like this
+
+
+
+
+
+
+ dhis2-startup
+ 1
+
+
+ dhis2-startup
+ Starts a dhis2 instance
+
+
+
+
+ /usr/bin/dhis2-startup
+ instance name
+
+
+
+
+ Description
+ Start a dhis2 instance
+
+
+ Examples
+ dhis2-startup myInstance
+
+
+
+
+
+
+ dhis2-shutdown
+ 1
+
+
+ dhis2-shutdown
+ Stops a dhis2 instance
+
+
+
+
+ /usr/bin/dhis2-shutdown
+ instance name
+
+
+
+
+ Description
+ Stop a dhis2 instance
+
+
+ Examples
+ dhis2-shutdown myInstance
+
+
+
+
+
+
+ dhis2-deploy-stable
+ 1
+
+
+ dhis2-deploy-stable
+ Deploys a war file
+
+
+
+
+ /usr/bin/dhis2-deploy-stable
+ instance name
+
+
+
+
+ Description
+ Deploys the latest stable dhis2 war file from http://stable.dhis2.org.
+
+
+ Examples
+ dhis2-deploy-stable myInstance
+
+
+
+
+
+
+ dhis2-logview
+ 1
+
+
+ dhis2-logview
+ Shows log file
+
+
+
+
+ /usr/bin/dhis2-logview
+ instance name
+
+
+
+
+ Description
+ Use this tool to view log of dhis2 instance using less.
+
+
+ Examples
+ dhis2-logview myInstance
+
+
+
+
+
+
+ dhis2-create-admin
+ 1
+
+
+ dhis2-create-admin
+ Create a user for administering dhis2 instances
+
+
+
+
+ /usr/bin/dhis2-create-admin
+ username
+
+
+
+
+ Description
+ Creates a new dhis2 admin user. If the specified user does not exist, she will be
+ created on the system. Otherwise an existing user is modified. The dhis2 admin user will
+ have postgres superuser privileges and wil be a member of the dhis2admin group.
+
+
+ Examples
+ Create it like this
+
+
+
+
=== added file 'tools/dhis2-tools-deb/install.sh'
--- tools/dhis2-tools-deb/install.sh 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/install.sh 2013-05-28 12:06:12 +0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+# set -e
+
+# need to use a ppa for postgres 9.2 and nginx
+sudo apt-get -y install python-software-properties -y
+sudo add-apt-repository ppa:pitti/postgresql -y
+sudo add-apt-repository ppa:nginx/stable -y
+sudo apt-get -y update
+
+# install the dhis2-tools deb
+dpkg -i dhis2-tools*
+apt-get -y install -f
=== added directory 'tools/dhis2-tools-deb/pkg'
=== added directory 'tools/dhis2-tools-deb/pkg/DEBIAN'
=== added file 'tools/dhis2-tools-deb/pkg/DEBIAN/conffiles'
--- tools/dhis2-tools-deb/pkg/DEBIAN/conffiles 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/DEBIAN/conffiles 2013-05-28 12:06:12 +0000
@@ -0,0 +1,1 @@
+/etc/sudoers.d/dhis2
=== added file 'tools/dhis2-tools-deb/pkg/DEBIAN/control'
--- tools/dhis2-tools-deb/pkg/DEBIAN/control 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/DEBIAN/control 2013-05-28 12:06:12 +0000
@@ -0,0 +1,14 @@
+Package: dhis2-tools
+Source: dhis2-tools
+Version: 1.0
+Architecture: all
+Maintainer: DHIS2 developers
+Installed-Size: 236
+Depends: openjdk-7-jdk,tomcat7-common (>= 7.0.26-1ubuntu1.1),netcat,nginx,ttf-liberation,libtcnative-1,makepasswd,postgresql-9.2
+Section: java
+Priority: optional
+Homepage: http://launchpad.net/dhis2
+Description: Tools for managing dhis2 on ubuntu
+ This package contains a set of tools to assist with
+ the installation and maintenance of the dhis2 (http://dhis2.org)
+ software on ubuntu server.
=== added file 'tools/dhis2-tools-deb/pkg/DEBIAN/postinst'
--- tools/dhis2-tools-deb/pkg/DEBIAN/postinst 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/DEBIAN/postinst 2013-05-28 12:06:12 +0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+echo "create group for dhis instances and group for dhis admins"
+addgroup dhis2admin 2>/dev/null || { echo "dhis2admin group exists"; }
+addgroup dhis2 2>/dev/null || { echo "dhis2 group exists"; }
+
+# echo "apache module setup"
+# a2enmod rewrite headers proxy_ajp disk_cache ssl
+
+exit 0
=== added file 'tools/dhis2-tools-deb/pkg/DEBIAN/postrm'
--- tools/dhis2-tools-deb/pkg/DEBIAN/postrm 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/DEBIAN/postrm 2013-05-28 12:06:12 +0000
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+# remove dhis2 user groups
+delgroup dhis2 2>dev/null || { echo "dhis2 group doesn't exist"; }
+delgroup dhis2admin 2>/dev/null || { echo "dhis2admin group doesn't exist"; }
=== added file 'tools/dhis2-tools-deb/pkg/DEBIAN/preinst'
--- tools/dhis2-tools-deb/pkg/DEBIAN/preinst 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/DEBIAN/preinst 2013-05-28 12:06:12 +0000
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+echo "Some preinstallation tasks ..."
+
+exit 0
=== added directory 'tools/dhis2-tools-deb/pkg/etc'
=== added directory 'tools/dhis2-tools-deb/pkg/etc/sudoers.d'
=== added file 'tools/dhis2-tools-deb/pkg/etc/sudoers.d/dhis2'
--- tools/dhis2-tools-deb/pkg/etc/sudoers.d/dhis2 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/etc/sudoers.d/dhis2 2013-05-28 12:06:12 +0000
@@ -0,0 +1,10 @@
+# sudoers file for dhis2 admins
+Cmnd_Alias DHIS2CREATE = /usr/bin/dhis2-instance-create
+Cmnd_Alias DHIS2PROGS = /usr/bin/dhis2-*
+
+Runas_Alias DHIS2USERS = %dhis2
+
+# Dhis2 admins can run dhis2-instance-create as root
+%dhis2admin ALL=(root)NOPASSWD:DHIS2CREATE,/usr/sbin/useradd
+# Dhis2 admins can run all dhis2 progs as the dhis2 instance user
+%dhis2admin ALL=(DHIS2USERS) ALL
=== added directory 'tools/dhis2-tools-deb/pkg/usr'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/bin'
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-backup'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-backup 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-backup 2013-05-28 12:06:12 +0000
@@ -0,0 +1,73 @@
+#!/usr/bin/env bash
+#########################################################
+# postgres backup script v1.2
+# author: Bob Jolliffe
+# licence: public domain
+#
+# using some ideas from
+# http://wiki.postgresql.org/wiki/Automated_Backup_on_Linux
+#########################################################
+
+BACKUP_DIR=~/backups/
+# REMOTE="ghbackup@178.79.143.102:./dhis"
+USER=$USER
+DBNAME=$USER
+# Keep Sunday's backup
+DAY_OF_WEEK_TO_KEEP=7
+WEEKS_TO_KEEP=6
+DAYS_TO_KEEP=7
+
+EXCLUDED="-T aggregated* -T analytics* -T completeness*"
+
+function perform_backups()
+{
+ SUFFIX=$1
+ FINAL_BACKUP_DIR=$BACKUP_DIR/backup"`date +\%Y-\%m-\%d`$SUFFIX/"
+
+ if ! mkdir -p $FINAL_BACKUP_DIR; then
+ echo "`date` Cannot create backup directory in $FINAL_BACKUP_DIR. Go and fix it!"
+ exit 1;
+ fi;
+
+ if ! pg_dump -O -Fp $DBNAME $EXCLUDED | gzip > $FINAL_BACKUP_DIR"$DBNAME".sql.gz.in_progress; then
+ echo "`date` [!!ERROR!!] Failed to produce plain backup of database $DBNAME"
+ else
+ mv $FINAL_BACKUP_DIR"$DBNAME".sql.gz.in_progress $FINAL_BACKUP_DIR"$DBNAME".sql.gz
+ # sync to remote server
+ # rsync -avq $BACKUP_DIR $REMOTE
+ fi
+}
+
+# MONTHLY BACKUPS
+DAY_OF_MONTH=`date +%d`
+
+if [ $DAY_OF_MONTH = "01" ];
+then
+ # Delete all expired monthly directories
+ find $BACKUP_DIR -maxdepth 1 -name "*-monthly" -exec rm -rf '{}' ';'
+
+ perform_backups "-monthly"
+
+ exit 0;
+fi
+
+# WEEKLY BACKUPS
+DAY_OF_WEEK=`date +%u` #1-7 (Monday-Sunday)
+EXPIRED_DAYS=`expr $((($WEEKS_TO_KEEP * 7) + 1))`
+
+if [ $DAY_OF_WEEK = $DAY_OF_WEEK_TO_KEEP ];
+then
+ # Delete all expired weekly directories
+ find $BACKUP_DIR -maxdepth 1 -mtime +$EXPIRED_DAYS -name "*-weekly" -exec rm -rf '{}' ';'
+
+ perform_backups "-weekly"
+
+ exit 0;
+fi
+
+# Delete daily backups 7 days old or more
+find $BACKUP_DIR -maxdepth 1 -mtime +$DAYS_TO_KEEP -name "*-daily" -exec rm -rf '{}' ';'
+
+perform_backups "-daily"
+
+
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-create-admin'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-create-admin 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-create-admin 2013-05-28 12:06:12 +0000
@@ -0,0 +1,26 @@
+#!/bin/sh
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# DHIS2 instance log viewer
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: dhis2-create-admin "
+ exit 1
+fi
+
+ADMINUSER=$1
+
+# if user doesn't exist, create
+id -u $ADMINUSER >/dev/null 2>&1 || {
+ sudo adduser $ADMINUSER
+}
+
+# give user superuser access to postgres
+sudo -u postgres dropuser $ADMINUSER 2>/dev/null || { echo "Creating new postgresql role"; }
+sudo -u postgres createuser -s $ADMINUSER
+# join the dhis2admin group
+sudo usermod -a -G dhis2admin $ADMINUSER
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-deploy-stable'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-deploy-stable 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-deploy-stable 2013-05-28 12:06:12 +0000
@@ -0,0 +1,25 @@
+#!/bin/sh
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# DHIS2 instance startup script
+
+set -e
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: dhis2-deploy-stable "
+ exit 1
+fi
+
+INSTANCE=$1
+DHIS2STABLE="http://stable.dhis2.org"
+
+dhis2-shutdown $INSTANCE 2>/dev/null || { echo $INSTANCE not running; }
+# clean out existing webapps
+sudo -u $INSTANCE rm -rf /var/lib/dhis2/$INSTANCE/webapps/* 1>/dev/null 2>&1 || { echo "No $INSTANCE webapps"; exit 1; }
+# get the latest stable dhis.war
+sudo -u $INSTANCE wget -O /var/lib/dhis2/$INSTANCE/webapps/$INSTANCE.war $DHIS2STABLE
+dhis2-startup $INSTANCE
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-instance-create'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-instance-create 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-instance-create 2013-05-28 12:06:12 +0000
@@ -0,0 +1,167 @@
+#!/bin/bash
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# Script to deploy a dhis2 instance
+
+set -e
+
+#############################################################
+# the user who is running the deploy script
+# should be in dhis2admin group
+
+if [[ "$(groups $USER)" =~ dhis2admin ]]
+then
+ echo "Good. User is in dhis2admin group"
+else
+ echo "$USER is not in dhis2admin group. You must be in the dhis2admin group to deploy a new instance"
+ exit 1
+fi
+##############################################################
+# variables and default values
+DHIS2BASEDIR=/var/lib/dhis2
+DHIS2SKEL=/usr/share/dhis2-tools/skel
+
+PROG=`basename $0`
+HTTPPORT=8080
+CREATEDB=true
+###############################################################
+usage() {
+ echo "Usage: $PROG [options] "
+ echo " instance: name of the dhis2 instance to create"
+ echo "Options:"
+ echo " -h, --help Display this help message"
+ echo " -n Do NOT create database for instance"
+ echo " -p httpport HTTP port to be used by Tomcat (default is $HTTPPORT)"
+}
+
+###############################################################
+checkport() {
+ type=$1
+ port=$2
+ echo "Checking $type port $port"
+ # Fail if port is non-numeric
+ num=`expr ${port} + 1 2> /dev/null`
+ if [ $? != 0 ] || [ $num -lt 2 ]; then
+ echo "Error: ${type} port '${port}' is not a valid TCP port number."
+ exit 1
+ fi
+
+ # Fail if port is above 65535
+ if [ ${port} -gt 65535 ]; then
+ echo "Error: ${type} port ${port} is above TCP port numbers (> 65535)."
+ exit 1
+ fi
+
+ # Fail if port is below 1024
+ if [ ${port} -lt 1024 ]; then
+ echo "Error: ports below 1024 are reserved to the super-user."
+ exit 1
+ fi
+
+ # Fail if port appears to be in use
+ if nc localhost "${port}" -z > /dev/null; then
+ echo "Error: ${type} port ${port} appears to be in use."
+ exit 1
+ fi
+}
+###############################################################
+
+# main entry point
+echo checking options
+while getopts p:nh opt
+do
+ case $opt in
+ p) HTTPPORT=$OPTARG ;;
+ n) CREATEDB=false ;;
+ h) usage;;
+ *) echo "Error: Unknown parameter '$OPTARG'."
+ exit 1;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+if [ "$#" -lt 1 ]; then
+ usage
+ exit 1
+fi
+if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
+ usage
+ exit 0
+fi
+
+
+TARGET=$1
+# TODO: parameterize database name
+DBNAME=$TARGET
+DHIS2HOME=$DHIS2BASEDIR/$TARGET
+
+# Fail if no target specified
+if [ -z "${TARGET}" ]; then
+ echo "Error: No Dhis2 instance name specified"
+ exit 1
+fi
+echo "You are about to create a Dhis2 instance called '$TARGET'"
+
+###############################################################
+
+# perform some checks before doing anything
+
+id -u $TARGET >/dev/null 2>&1 && { echo "User $TARGET already exists"; exit 1; }
+checkport HTTP "$HTTPPORT"
+if $CREATEDB; then
+ sudo -u postgres psql $DBNAME -c '\q' >/dev/null 2>&1 && { echo "Database $DBNAME exists"; exit 1; }
+fi
+###############################################################
+
+# Right, we should be good to go ...
+
+# create the system user
+sudo useradd -m -s /bin/bash -b $DHIS2BASEDIR -c "$TARGET dhis2 instance" -g dhis2 -k $DHIS2SKEL $TARGET
+# create the database user with a strong password
+PASSWORD=$(makepasswd --chars=10)
+sudo -u postgres psql -c "CREATE ROLE $TARGET PASSWORD '$PASSWORD' NOSUPERUSER CREATEDB NOCREATEROLE INHERIT LOGIN;"
+
+if $CREATEDB; then
+ # Create the database
+ sudo -u postgres psql -c "CREATE DATABASE $DBNAME OWNER $TARGET ENCODING 'UTF-8' TEMPLATE template0;"
+ sudo -u postgres psql -c "GRANT ALL ON DATABASE $DBNAME TO $TARGET;"
+fi
+
+sudo -u $TARGET sh -c "cat > $DHIS2HOME/hibernate.properties" << EOT
+hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
+hibernate.connection.driver_class = org.postgresql.Driver
+hibernate.connection.url = jdbc:postgresql://localhost:5432/$DBNAME
+hibernate.connection.username = $TARGET
+hibernate.connection.password = $PASSWORD
+hibernate.hbm2ddl.auto = update
+EOT
+
+sudo -u $TARGET chmod 0600 $DHIS2HOME/hibernate.properties
+sudo -u $TARGET sed -i s/HTTPPORT/$HTTPPORT/ $DHIS2HOME/conf/server.xml
+
+sudo -u $TARGET sh -c "cat > $DHIS2HOME/logrotate.conf" << EOT
+$DHIS2HOME/logs/catalina.out {
+ rotate 24
+ dateext
+ monthly
+ create
+ compress
+ copytruncate
+ noolddir
+}
+EOT
+
+###############################################################
+
+# setup user crontab
+
+sudo -u $TARGET sh -c "crontab -u $TARGET -" << EOT
+@reboot /usr/bin/dhis2-startup $TARGET
+20 19 * * * /usr/bin/dhis2_backup $TARGET
+21 00 * * * /usr/sbin/logrotate -s $DHIS2HOME/logrotate.status $DHIS2HOME/logrotate.conf
+EOT
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-logview'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-logview 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-logview 2013-05-28 12:06:12 +0000
@@ -0,0 +1,17 @@
+#!/bin/sh
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# DHIS2 instance log viewer
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: dhis2-logview "
+ exit 1
+fi
+
+INSTANCE=$1
+
+sudo -u $INSTANCE less /var/lib/dhis2/$INSTANCE/logs/catalina.out
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-nginx'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-nginx 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-nginx 2013-05-28 12:06:12 +0000
@@ -0,0 +1,25 @@
+#!/bin/bash
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# DHIS2 instance startup script
+
+if [ "$#" -lt 1 ]; then
+ echo "No conf file specifiied - using default"
+ CONFFILE=/usr/share/dhis2-tools/samples/nginx/dhis2
+else
+ CONFFILE=$1
+fi
+
+BASE=$(basename $CONFFILE)
+
+# nginx setup
+echo "setting up nginx with $CONFFILE"
+[[ -e /etc/nginx/sites-available/$BASE ]] && { echo "/etc/nginx/sites-available/$BASE already exists"; exit 1; }
+cp $CONFFILE /etc/nginx/sites-available
+unlink /etc/nginx/sites-enabled/* || { echo "no nginx sites configured"; }
+ln -s /etc/nginx/sites-available/$BASE /etc/nginx/sites-enabled/$BASE
+/etc/init.d/nginx restart
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-restoredb 2013-05-28 12:06:12 +0000
@@ -0,0 +1,34 @@
+#!/bin/bash
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# Script to restore a database dump
+
+set -e
+
+if [ "$#" -ne 2 ]; then
+ echo "usage: dhis2-restoredb "
+ exit 1
+fi
+
+DHIS2_USER=$INSTANCE
+DHIS2_DB=$INSTANCE
+DHIS2_BASE=/var/lib/dhis2/$DHIS2_USER
+BACKUP=$DHIS2_BASE/backup/snapshot_$(date +%Y%m%d%M%S).sql.bz2
+
+# stop tomcat and take a snapshot backup of the current database before doing anything
+dhis2-shutdown $INSTANCE
+sudo -u postgres pg_dump -O $INSTANCE | bzip2 > $BACKUP
+
+# drop and recreate a new blank database
+sudo -u postgres dropdb $DHIS2_DB
+sudo -u postgres createdb -O $DHIS2_USER $DHIS2_DB
+
+# restore the backup into the new database
+cat $2 | sudo -u postgres psql $DHIS2_DB
+
+# restart tomcat
+dhis2-startup $INSTANCE
\ No newline at end of file
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-shutdown'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-shutdown 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-shutdown 2013-05-28 12:06:12 +0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# DHIS2 instance startup script
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: dhis2-shutdown "
+ exit 1
+fi
+
+INSTANCE=$1
+PID=$(cat /var/lib/dhis2/$INSTANCE/tomcat.pid)
+echo "Shutting down dhis2 instance"
+sudo -u $INSTANCE kill $PID || sudo -u $INSTANCE rm $PID
=== added file 'tools/dhis2-tools-deb/pkg/usr/bin/dhis2-startup'
--- tools/dhis2-tools-deb/pkg/usr/bin/dhis2-startup 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/bin/dhis2-startup 2013-05-28 12:06:12 +0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# DHIS2 instance startup script
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: dhis2-startup "
+ exit 1
+fi
+
+INSTANCE=$1
+
+sudo -u $INSTANCE CATALINA_BASE=/var/lib/dhis2/$INSTANCE /usr/share/tomcat7/bin/startup.sh
+echo "DHIS2 instance starting for $INSTANCE"
\ No newline at end of file
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/doc'
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/doc/copyright'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/doc/copyright 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/doc/copyright 2013-05-28 12:06:12 +0000
@@ -0,0 +1,24 @@
+Copyright (c) 2004-2007, University of Oslo
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* 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.
+* Neither the name of the HISP project nor the names of its contributors may
+ be used to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS 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 COPYRIGHT OWNER OR 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.
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2'
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2/dhis2-ssl'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2/dhis2-ssl 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2/dhis2-ssl 2013-05-28 12:06:12 +0000
@@ -0,0 +1,78 @@
+
+
+
+ #===========================================================
+ # tomcat backends
+ #===========================================================
+ # ProxyPass /DHISMAIN ajp://localhost:DHISMAINPORT/DHISMAIN
+
+ #===========================================================
+ # try and cache whatever we can
+ #===========================================================
+ CacheEnable disk /
+
+ #===========================================================
+ # Rewrite requests for / to main dhis application
+ #===========================================================
+ RewriteEngine on
+ # RewriteRule ^/$ /DHISMAIN/ [R]
+
+ #===========================================================
+ # Logging
+ #===========================================================
+ ErrorLog /var/log/apache2/error.log
+ LogLevel warn
+ CustomLog /var/log/apache2/ssl_access.log combined
+
+ #===========================================================
+ # standard web server document root for serving content
+ # outside of dhis2 webapp
+ #===========================================================
+ DocumentRoot /var/www
+
+ Options FollowSymLinks
+ AllowOverride None
+
+
+ Options Indexes FollowSymLinks MultiViews
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
+
+ AllowOverride None
+ Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ Order allow,deny
+ Allow from all
+
+
+ #===========================================================
+ # SSL configuration
+ #===========================================================
+ SSLEngine on
+
+ # set these to match your server certificate and key
+ SSLCertificateFile /etc/ssl/certs/server.cer
+ SSLCertificateKeyFile /etc/ssl/private/server.key
+ # some CA's might also provide you with a CA cert to install
+ # SSLCACertificateFile /etc/ssl/certs/EV_CA_Bundle.pem
+
+ SSLProtocol all
+ SSLCipherSuite HIGH:MEDIUM
+
+
+ SSLOptions +StdEnvVars
+
+
+ SSLOptions +StdEnvVars
+
+
+ BrowserMatch "MSIE [2-6]" \
+ nokeepalive ssl-unclean-shutdown \
+ downgrade-1.0 force-response-1.0
+ BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
+
+
+
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2/http-redirect'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2/http-redirect 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/apache2/http-redirect 2013-05-28 12:06:12 +0000
@@ -0,0 +1,5 @@
+
+ ServerAdmin webmaster@localhost
+ ServerName SERVERNAME
+ Redirect permanent / https://SERVERNAME/
+
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/nginx'
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/nginx/dhis2'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/nginx/dhis2 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/samples/nginx/dhis2 2013-05-28 12:06:12 +0000
@@ -0,0 +1,38 @@
+# apply these settings to all backends
+proxy_cache_path /var/cache/nginx keys_zone=dhis:250m inactive=1d;
+proxy_redirect off;
+proxy_set_header Host $host;
+proxy_set_header X-Real-IP $remote_addr;
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+proxy_set_header X-Forwarded-Proto https;
+proxy_cache dhis;
+
+# redirect http to https server
+server {
+ listen 80;
+ rewrite ^ https://$host$request_uri? permanent;
+}
+
+# HTTPS server
+server {
+ listen 443;
+ client_max_body_size 10M;
+
+ # ssl stuff
+ ssl on;
+ ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
+ ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
+ ssl_session_timeout 30m;
+
+ ssl_protocols SSLv2 SSLv3 TLSv1;
+ ssl_ciphers HIGH:!aNULL:!MD5;
+ ssl_prefer_server_ciphers on;
+
+ # nominate a backend as the default
+ rewrite ^/$ /dhis/;
+
+ # Proxy pass to servlet containers
+ location /dhis { proxy_pass http://localhost:8080/dhis; }
+ location /training { proxy_pass http://localhost:8081/training; }
+ location /demo { proxy_pass http://localhost:8082/demo; }
+}
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/backups'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/bin'
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/bin/setenv.sh'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/bin/setenv.sh 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/bin/setenv.sh 2013-05-28 12:06:12 +0000
@@ -0,0 +1,32 @@
+#!/bin/sh
+# ____ __ ______________
+# / __ \/ / / / _/ ___/__ \
+# / / / / /_/ // / \__ \__/ /
+# / /_/ / __ // / ___/ / __/
+# /_____/_/ /_/___//____/____/
+#
+# Environment variables used by tomcat
+#
+
+# Virtual machine tuning
+# Set heap size according to your available memory.
+# In most cases this will be all you need to set (be sure
+# you have allocated plenty for postgres).
+
+HEAP=2G
+
+# venture below here only if you know what you are doing ....
+
+# sets basic memory size parameters
+export CATALINA_OPTS="-Xms$HEAP -Xmx$HEAP -XX:MaxPermSize=256m -Xss256m"
+
+# some best practice suggestions from https://gist.github.com/terrancesnyder/986029
+export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC"
+export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500"
+export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9"
+export CATALINA_OPTS="$CATALINA_OPTS -server"
+
+# You can generally leave these untouched
+export CATALINA_PID=$CATALINA_BASE/tomcat.pid
+export CATALINA_HOME=/usr/share/tomcat7
+export DHIS2_HOME=$CATALINA_BASE
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/Catalina'
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/catalina.properties'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/catalina.properties 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/catalina.properties 2013-05-28 12:06:12 +0000
@@ -0,0 +1,81 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "server"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+server.loader=${catalina.home}/server/classes,${catalina.home}/server/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "shared"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/context.xml'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/context.xml 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/context.xml 2013-05-28 12:06:12 +0000
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ WEB-INF/web.xml
+
+
+
+
+
+
+
+
+
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/logging.properties'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/logging.properties 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/logging.properties 2013-05-28 12:06:12 +0000
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+handlers = java.util.logging.ConsoleHandler
+
+.handlers = java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#org.apache.catalina.startup.ContextConfig.level = FINE
+#org.apache.catalina.startup.HostConfig.level = FINE
+#org.apache.catalina.session.ManagerBase.level = FINE
+#org.apache.catalina.core.AprLifecycleListener.level=FINE
+
+org.apache.catalina.filters.ExpiresFilter.level = FINE
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/logrotate.conf'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/logrotate.conf 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/logrotate.conf 2013-05-28 12:06:12 +0000
@@ -0,0 +1,10 @@
+~/logs/catalina.out {
+ rotate 24
+ dateext
+ monthly
+ create
+ compress
+ copytruncate
+ noolddir
+}
+
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/server.xml'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/server.xml 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/server.xml 2013-05-28 12:06:12 +0000
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/tomcat-users.xml'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/tomcat-users.xml 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/tomcat-users.xml 2013-05-28 12:06:12 +0000
@@ -0,0 +1,26 @@
+
+
+
+
+
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/web.xml'
--- tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/web.xml 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/conf/web.xml 2013-05-28 12:06:12 +0000
@@ -0,0 +1,1275 @@
+
+
+
+
+
+ ExpiresFilter
+ org.apache.catalina.filters.ExpiresFilter
+
+ ExpiresDefault
+ access plus 1 week
+
+
+
+ ImageExpiresFilter
+ org.apache.catalina.filters.ExpiresFilter
+
+ ExpiresByType image
+ access plus 1 week
+
+
+
+
+ ExpiresFilter
+ *.js
+ REQUEST
+
+
+ ExpiresFilter
+ *.css
+ REQUEST
+
+
+ ExpiresFilter
+ *.gif
+ REQUEST
+
+
+ ExpiresFilter
+ *.woff
+ REQUEST
+
+
+ ExpiresFilter
+ *.ttf
+ REQUEST
+
+
+ ExpiresFilter
+ *.eot
+ REQUEST
+
+
+ ExpiresFilter
+ *.ico
+ REQUEST
+
+
+ ExpiresFilter
+ /images/*
+ REQUEST
+
+
+ ExpiresFilter
+ /icons/*
+ REQUEST
+
+
+
+ ImageExpiresFilter
+ /dhis-web-commons/*
+ REQUEST
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ default
+ org.apache.catalina.servlets.DefaultServlet
+
+ debug
+ 0
+
+
+ listings
+ false
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jsp
+ org.apache.jasper.servlet.JspServlet
+
+ fork
+ false
+
+
+ xpoweredBy
+ false
+
+ 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ default
+ /
+
+
+
+
+
+
+
+ jsp
+ *.jsp
+
+
+
+ jsp
+ *.jspx
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 30
+
+
+
+
+
+
+
+
+
+
+
+ abs
+ audio/x-mpeg
+
+
+ ai
+ application/postscript
+
+
+ aif
+ audio/x-aiff
+
+
+ aifc
+ audio/x-aiff
+
+
+ aiff
+ audio/x-aiff
+
+
+ aim
+ application/x-aim
+
+
+ art
+ image/x-jg
+
+
+ asf
+ video/x-ms-asf
+
+
+ asx
+ video/x-ms-asf
+
+
+ au
+ audio/basic
+
+
+ avi
+ video/x-msvideo
+
+
+ avx
+ video/x-rad-screenplay
+
+
+ bcpio
+ application/x-bcpio
+
+
+ bin
+ application/octet-stream
+
+
+ bmp
+ image/bmp
+
+
+ body
+ text/html
+
+
+ cdf
+ application/x-cdf
+
+
+ cer
+ application/x-x509-ca-cert
+
+
+ class
+ application/java
+
+
+ cpio
+ application/x-cpio
+
+
+ csh
+ application/x-csh
+
+
+ css
+ text/css
+
+
+ dib
+ image/bmp
+
+
+ doc
+ application/msword
+
+
+ dtd
+ application/xml-dtd
+
+
+ dv
+ video/x-dv
+
+
+ dvi
+ application/x-dvi
+
+
+ eps
+ application/postscript
+
+
+ etx
+ text/x-setext
+
+
+ exe
+ application/octet-stream
+
+
+ gif
+ image/gif
+
+
+ gtar
+ application/x-gtar
+
+
+ gz
+ application/x-gzip
+
+
+ hdf
+ application/x-hdf
+
+
+ hqx
+ application/mac-binhex40
+
+
+ htc
+ text/x-component
+
+
+ htm
+ text/html
+
+
+ html
+ text/html
+
+
+ hqx
+ application/mac-binhex40
+
+
+ ief
+ image/ief
+
+
+ jad
+ text/vnd.sun.j2me.app-descriptor
+
+
+ jar
+ application/java-archive
+
+
+ java
+ text/plain
+
+
+ jnlp
+ application/x-java-jnlp-file
+
+
+ jpe
+ image/jpeg
+
+
+ jpeg
+ image/jpeg
+
+
+ jpg
+ image/jpeg
+
+
+ js
+ text/javascript
+
+
+ jsf
+ text/plain
+
+
+ jspf
+ text/plain
+
+
+ kar
+ audio/x-midi
+
+
+ latex
+ application/x-latex
+
+
+ m3u
+ audio/x-mpegurl
+
+
+ mac
+ image/x-macpaint
+
+
+ man
+ application/x-troff-man
+
+
+ mathml
+ application/mathml+xml
+
+
+ me
+ application/x-troff-me
+
+
+ mid
+ audio/x-midi
+
+
+ midi
+ audio/x-midi
+
+
+ mif
+ application/x-mif
+
+
+ mov
+ video/quicktime
+
+
+ movie
+ video/x-sgi-movie
+
+
+ mp1
+ audio/x-mpeg
+
+
+ mp2
+ audio/x-mpeg
+
+
+ mp3
+ audio/x-mpeg
+
+
+ mp4
+ video/mp4
+
+
+ mpa
+ audio/x-mpeg
+
+
+ mpe
+ video/mpeg
+
+
+ mpeg
+ video/mpeg
+
+
+ mpega
+ audio/x-mpeg
+
+
+ mpg
+ video/mpeg
+
+
+ mpv2
+ video/mpeg2
+
+
+ ms
+ application/x-wais-source
+
+
+ nc
+ application/x-netcdf
+
+
+ oda
+ application/oda
+
+
+
+ odb
+ application/vnd.oasis.opendocument.database
+
+
+
+ odc
+ application/vnd.oasis.opendocument.chart
+
+
+
+ odf
+ application/vnd.oasis.opendocument.formula
+
+
+
+ odg
+ application/vnd.oasis.opendocument.graphics
+
+
+
+ odi
+ application/vnd.oasis.opendocument.image
+
+
+
+ odm
+ application/vnd.oasis.opendocument.text-master
+
+
+
+ odp
+ application/vnd.oasis.opendocument.presentation
+
+
+
+ ods
+ application/vnd.oasis.opendocument.spreadsheet
+
+
+
+ odt
+ application/vnd.oasis.opendocument.text
+
+
+ ogg
+ application/ogg
+
+
+
+ otg
+ application/vnd.oasis.opendocument.graphics-template
+
+
+
+ oth
+ application/vnd.oasis.opendocument.text-web
+
+
+
+ otp
+ application/vnd.oasis.opendocument.presentation-template
+
+
+
+ ots
+ application/vnd.oasis.opendocument.spreadsheet-template
+
+
+
+ ott
+ application/vnd.oasis.opendocument.text-template
+
+
+ pbm
+ image/x-portable-bitmap
+
+
+ pct
+ image/pict
+
+
+ pdf
+ application/pdf
+
+
+ pgm
+ image/x-portable-graymap
+
+
+ pic
+ image/pict
+
+
+ pict
+ image/pict
+
+
+ pls
+ audio/x-scpls
+
+
+ png
+ image/png
+
+
+ pnm
+ image/x-portable-anymap
+
+
+ pnt
+ image/x-macpaint
+
+
+ ppm
+ image/x-portable-pixmap
+
+
+ ppt
+ application/vnd.ms-powerpoint
+
+
+ pps
+ application/vnd.ms-powerpoint
+
+
+ ps
+ application/postscript
+
+
+ psd
+ image/x-photoshop
+
+
+ qt
+ video/quicktime
+
+
+ qti
+ image/x-quicktime
+
+
+ qtif
+ image/x-quicktime
+
+
+ ras
+ image/x-cmu-raster
+
+
+ rdf
+ application/rdf+xml
+
+
+ rgb
+ image/x-rgb
+
+
+ rm
+ application/vnd.rn-realmedia
+
+
+ roff
+ application/x-troff
+
+
+ rtf
+ application/rtf
+
+
+ rtx
+ text/richtext
+
+
+ sh
+ application/x-sh
+
+
+ shar
+ application/x-shar
+
+
+
+ smf
+ audio/x-midi
+
+
+ sit
+ application/x-stuffit
+
+
+ snd
+ audio/basic
+
+
+ src
+ application/x-wais-source
+
+
+ sv4cpio
+ application/x-sv4cpio
+
+
+ sv4crc
+ application/x-sv4crc
+
+
+ svg
+ image/svg+xml
+
+
+ svgz
+ image/svg+xml
+
+
+ swf
+ application/x-shockwave-flash
+
+
+ t
+ application/x-troff
+
+
+ tar
+ application/x-tar
+
+
+ tcl
+ application/x-tcl
+
+
+ tex
+ application/x-tex
+
+
+ texi
+ application/x-texinfo
+
+
+ texinfo
+ application/x-texinfo
+
+
+ tif
+ image/tiff
+
+
+ tiff
+ image/tiff
+
+
+ tr
+ application/x-troff
+
+
+ tsv
+ text/tab-separated-values
+
+
+ txt
+ text/plain
+
+
+ ulw
+ audio/basic
+
+
+ ustar
+ application/x-ustar
+
+
+ vxml
+ application/voicexml+xml
+
+
+ xbm
+ image/x-xbitmap
+
+
+ xht
+ application/xhtml+xml
+
+
+ xhtml
+ application/xhtml+xml
+
+
+ xls
+ application/vnd.ms-excel
+
+
+ xml
+ application/xml
+
+
+ xpm
+ image/x-xpixmap
+
+
+ xsl
+ application/xml
+
+
+ xslt
+ application/xslt+xml
+
+
+ xul
+ application/vnd.mozilla.xul+xml
+
+
+ xwd
+ image/x-xwindowdump
+
+
+ vsd
+ application/x-visio
+
+
+ wav
+ audio/x-wav
+
+
+
+ wbmp
+ image/vnd.wap.wbmp
+
+
+
+ wml
+ text/vnd.wap.wml
+
+
+
+ wmlc
+ application/vnd.wap.wmlc
+
+
+
+ wmls
+ text/vnd.wap.wmlscript
+
+
+
+ wmlscriptc
+ application/vnd.wap.wmlscriptc
+
+
+ wmv
+ video/x-ms-wmv
+
+
+ wrl
+ x-world/x-vrml
+
+
+ wspolicy
+ application/wspolicy+xml
+
+
+ Z
+ application/x-compress
+
+
+ z
+ application/x-compress
+
+
+ zip
+ application/zip
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ index.html
+ index.htm
+ index.jsp
+
+
+
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/lib'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/logs'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/dhis2-tools/skel/webapps'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/doc'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools'
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools/changelog.gz'
Binary files tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools/changelog.gz 1970-01-01 00:00:00 +0000 and tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools/changelog.gz 2013-05-28 12:06:12 +0000 differ
=== added file 'tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools/copyright'
--- tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools/copyright 1970-01-01 00:00:00 +0000
+++ tools/dhis2-tools-deb/pkg/usr/share/doc/dhis2-tools/copyright 2013-05-28 12:06:12 +0000
@@ -0,0 +1,135 @@
+Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166
+Upstream-Name: Tomcat7
+Upstream-Contact: Merten Falk
+Source: http://tomcat.apache.org/download-70.cgi
+Upstream-Authors:
+ Alex Chaffee
+ Alex Cruikshank [alex@epitonic.com]
+ Amy Roh
+ Andre de Jesus
+ Andrew R. Jaquith
+ Andy Clark
+ Aner Perez
+ Anil V (akv@eng.sun.com)
+ Anselm Baird-Smith
+ Arnaud Le Hors, IBM
+ Bela Ban (modifications for synchronous replication)
+ Bill Barker
+ Bill Burke
+ Bip Thelin
+ Cedrik LIME
+ Carson McDonald
+ Costin@eng.sun.com
+ Craig R. McClanahan
+ Dan Milstein [danmil@shore.net]
+ Dan Sandberg
+ Daniel Rall
+ Danno Ferrin
+ David Becker
+ Denis Benoit
+ Eric Rescorla
+ Eric Ye, IBM
+ Fabien Carrion
+ Fabrizio Giustina
+ Filip Hanik
+ Gabriele Garuglieri
+ Gal Shachor [shachor@il.ibm.com]
+ Glenn L. Nielsen
+ Glenn Marcy, IBM
+ Greg Murray
+ Gunnar Rjnning
+ Hans Bergsten
+ Harish Prabandham
+ Henri Gomez [hgomez@apache.org]
+ Ignacio J. Ortega
+ Jacek Laskowski
+ Jacob Hookom [jacob@hookom.net]
+ James Duncan Davidson [duncan@eng.sun.com]
+ James Todd [gonzo@sun.com]
+ Jan Luehe
+ Jason Brittain
+ Jason Hunter [jch@eng.sun.com]
+ Jason van Zyl
+ Jayson Falkner
+ Jean-Francois Arcand
+ Jean-Frederic Clere
+ Jeffrey Rodriguez
+ John Holman
+ John McNally
+ Jon S. Stevens
+ Justyna Horwat
+ Keith Wannamaker [Keith@Wannamaker.org]
+ Kevin Seguin
+ Kief Morris (kief@kief.com)
+ Kin-man Chung
+ Larry Cable
+ Larry Isaacs
+ Malcolm Edgar
+ Mandar Raje
+ Mark Roth
+ Mark Thomas
+ Martin Cooper
+ Martin T Dengler [root@martindengler.com]
+ Mel Martinez [mmartinez@g1440.com]
+ Michael Glavassevich, IBM
+ Mladen Turk
+ Neil Graham, IBM
+ Nicola Ken Barozzi
+ Paul Speed
+ Peter Donald
+ Peter Lin
+ Peter Rossbach (pero@apache.org)
+ Pierre Delisle
+ Rafal Krzewski Rafal.Krzewski@e-point.pl
+ Rahul Srivastava, Sun Microsystems Inc.
+ Rainer Jung
+ Rajiv Mordani
+ Remy Maucharat
+ Remy Maucherat
+ Richard A. Sitze
+ Robert Field (inner SDEInstaller class)
+ Rod Waldhoff
+ Scott Sanders
+ Sean C. Sullivan
+ Sean Legassick
+ Sean Legassick
+ Shawn Bayern
+ Stan Bailes
+ Stefan Freyr Stefansson
+ Stefano Mazzocchi
+ TAMURA Kent, IBM
+ Takayuki Kaneko
+ Tim Fennell
+ Tim Funk
+ Tim Tye
+ Vivek Chopra
+ Yoav Shapira
+
+Files: *
+Copyright: 2000-2011 Apache Software Foundation.
+ 2002, International Business Machines Corporation.
+License: Apache-2.0
+
+Files: debian/*
+Copyright:
+ 2008,2011, Canonical Ltd.
+ 2008, Paul Cager
+ 2010, Thierry Carrez
+ 2011, Ernesto Hernanez-Novich
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian GNU/Linux and Ubuntu systems, the complete text of the Apache 2.0
+ License can be found in the `/usr/share/common-licenses/Apache-2.0' file.
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/man'
=== added directory 'tools/dhis2-tools-deb/pkg/usr/share/man/man1'
=== added directory 'tools/dhis2-tools-deb/pkg/var'
=== added directory 'tools/dhis2-tools-deb/pkg/var/lib'
=== added directory 'tools/dhis2-tools-deb/pkg/var/lib/dhis2'
=== added directory 'tools/dhis2-tools-deb/pkg/var/log'
=== added directory 'tools/dhis2-tools-deb/pkg/var/log/dhis2'