--- prewikka-0.9.11.4.orig/debian/pycompat +++ prewikka-0.9.11.4/debian/pycompat @@ -0,0 +1 @@ +2 --- prewikka-0.9.11.4.orig/debian/prewikka.postinst +++ prewikka-0.9.11.4/debian/prewikka.postinst @@ -0,0 +1,75 @@ +#!/bin/sh +# postinst script for prewikka +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] + + +# helper functions + +replace_file () { + file=$1 + file_new=$2 + if [ ! -f ${file} ] ; then + mv ${file_new} ${file} + else + ucf --three-way --debconf-ok ${file_new} $file + fi +} + +do_update () { + file=$1 + file_new=$2 + if diff -q ${file} ${file_new} >/dev/null 2>&1; then + # Old file and new file are identical + rm -f ${file_new} + else + replace_file $file $file_new + rm -f ${file_new} + fi +} + + +CONF=/etc/prewikka/prewikka.conf +CONF_NEW="${CONF}-new" + + +if [ "$1" = "configure" ]; then + . /usr/share/dbconfig-common/dpkg/postinst + dbc_go prewikka $@ + + if [ -z "$dbc_dbserver" ]; then + dbc_dbserver=localhost + fi + + cp /usr/share/doc/prewikka/examples/prewikka.conf $CONF_NEW + + # do the following only if user has choosen dbconfig to manage database + if [ -n "$dbc_dbtype" ]; then + # the following code is an ugly way to replace the SQL parameters in the prewikka config + # by searching the [database] entry, and replacing the values in the following lines + sed -i "/\[database\]/{n;s/type: .*$/type: $dbc_dbtype/;n;n;s/user: .*$/user: $dbc_dbuser/;n;s/pass: .*$/pass: $dbc_dbpass/;n;s/name: .*$/name: $dbc_dbname/;}" $CONF_NEW + fi + + if diff -q /usr/share/doc/prewikka/examples/prewikka.conf ${CONF} >/dev/null 2>&1; then + # prewikka configure file has not been changed .. overwrite it + cp $CONF_NEW $CONF + else + do_update $CONF $CONF_NEW + fi + + db_stop + + # make sure conf file has the correct permissions and owner/group + chmod 640 /etc/prewikka/prewikka.conf +fi + +#DEBHELPER# + +exit 0 + + --- prewikka-0.9.11.4.orig/debian/changelog +++ prewikka-0.9.11.4/debian/changelog @@ -0,0 +1,45 @@ +prewikka (0.9.11.4-1) unstable; urgency=low + + * New upstream release + + -- Pierre Chifflier Tue, 12 Jun 2007 09:51:08 +0200 + +prewikka (0.9.11.3-2) unstable; urgency=low + + * Make sure prewikka.conf is not world-readable + + -- Pierre Chifflier Fri, 08 Jun 2007 15:35:25 +0200 + +prewikka (0.9.11.3-1) unstable; urgency=low + + * New upstream release + + -- Pierre Chifflier Thu, 31 May 2007 09:40:25 +0200 + +prewikka (0.9.11.2-1) unstable; urgency=low + + * New upstream release + + -- Pierre Chifflier Mon, 28 May 2007 16:16:44 +0200 + +prewikka (0.9.11-1) unstable; urgency=low + + * New upstream release (add internationalization support) + + -- Pierre Chifflier Tue, 22 May 2007 09:50:33 +0200 + +prewikka (0.9.10-1) unstable; urgency=low + + * New upstream release + * Patch postgresql tables creation script (do not drop inexistant tables) + * Update my email address + * Add watch file + + -- Pierre Chifflier Wed, 11 Apr 2007 14:41:09 +0200 + +prewikka (0.9.9-1) unstable; urgency=low + + * Initial release (Closes: #410090) + + -- Pierre Chifflier Wed, 7 Feb 2007 16:51:26 +0100 + --- prewikka-0.9.11.4.orig/debian/docs +++ prewikka-0.9.11.4/debian/docs @@ -0,0 +1,3 @@ +HACKING.README +NEWS +README --- prewikka-0.9.11.4.orig/debian/compat +++ prewikka-0.9.11.4/debian/compat @@ -0,0 +1 @@ +5 --- prewikka-0.9.11.4.orig/debian/prewikka.config +++ prewikka-0.9.11.4/debian/prewikka.config @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +action=$1 +version=$2 + +# Source debconf library. +. /usr/share/debconf/confmodule +db_version 2.0 || [ 0 -lt 30 ] + +#db_input medium prewikka/webserver || true +#db_go + +if [ -f /usr/share/dbconfig-common/dpkg/config ]; then + dbc_dbtypes="mysql, pgsql" + dbc_authmethod_user="password" + + . /usr/share/dbconfig-common/dpkg/config + dbc_go prewikka $@ +fi + +db_input high prewikka/configuration || true +db_go --- prewikka-0.9.11.4.orig/debian/control +++ prewikka-0.9.11.4/debian/control @@ -0,0 +1,21 @@ +Source: prewikka +Section: web +Priority: extra +XS-Python-Version: all +Maintainer: Pierre Chifflier +Build-Depends: debhelper (>= 5.0.37.2), python, python-all-dev, python-central (>= 0.5), python-cheetah +Standards-Version: 3.7.2 + +Package: prewikka +Architecture: all +XB-Python-Version: ${python:Versions} +Depends: ${python:Depends}, ${misc:Depends}, python-cheetah, python-prelude, python-preludedb, ucf, dbconfig-common +Description: Graphical analysis console for the Prelude IDS Framework + Prewikka is a graphical front-end analysis console for the Prelude + Hybrid IDS Framework. + . + Providing numerous features, Prewikka facilitates the work of users and + analysts. It provides alert aggregation and sensor and hearbeat views, + and has user management and configurable filters. It has access to + external tools such as whois and traceroute. + --- prewikka-0.9.11.4.orig/debian/copyright +++ prewikka-0.9.11.4/debian/copyright @@ -0,0 +1,33 @@ +This package was debianized by Pierre Chifflier on +Wed, 7 Feb 2007 16:51:26 +0100. + +It was downloaded from + +Upstream Author: Yoann Vandoorselaere + +Copyright: 2001-2006 Yoann Vandoorselaere + +License: + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + 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 General Public License for more details. + + You should have received a copy of the GNU 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 General +Public License can be found in `/usr/share/common-licenses/GPL'. + + + +The Debian packaging is (C) 2007, Pierre Chifflier and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + --- prewikka-0.9.11.4.orig/debian/prewikka.prerm +++ prewikka-0.9.11.4/debian/prewikka.prerm @@ -0,0 +1,18 @@ +#!/bin/sh +# prerm script for prewikka +# +# see: dh_installdeb(1) + +set -e + +# source debconf stuff +. /usr/share/debconf/confmodule +# source dbconfig-common stuff +. /usr/share/dbconfig-common/dpkg/prerm +dbc_go prewikka $@ + +#DEBHELPER# + +exit 0 + + --- prewikka-0.9.11.4.orig/debian/rules +++ prewikka-0.9.11.4/debian/rules @@ -0,0 +1,89 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + +PYTHON := /usr/bin/python +PYVER := $(shell $(PYTHON) -c 'import sys; print sys.version[:3]') + + +build: build-stamp + +build-stamp: + dh_testdir + python setup.py build + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + rm -rf build + -find . -name '*.py[co]' | xargs rm -f + -find locale -mindepth 1 -maxdepth 1 -type d | xargs rm -rf + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + python setup.py install \ + --root=$(CURDIR)/debian/prewikka + + cp database/mysql.sql debian/prewikka/usr/share/dbconfig-common/data/prewikka/install/mysql + cp database/pgsql.sql debian/prewikka/usr/share/dbconfig-common/data/prewikka/install/pgsql + sed -i 's/^DROP TABLE/-- DROP TABLE/' debian/prewikka/usr/share/dbconfig-common/data/prewikka/install/pgsql + + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples conf/prewikka.conf + # make python scripts executable + for i in `find debian -mindepth 3 -type f`; do \ + case $$i in \ + *.py) \ + if head -n 1 $$i | grep -q -s "#!/"; then \ + chmod 755 $$i; \ + fi; \ + ;; \ + esac \ + done + -find debian/prewikka/usr/share/prewikka/htdocs/images -maxdepth 1 -type f -exec chmod 644 {} \; + -find debian/prewikka/usr/share/prewikka/htdocs/css -maxdepth 1 -type f -exec chmod 644 {} \; +# dh_install + dh_installdebconf -pprewikka + dh_pycentral -pprewikka + dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- prewikka-0.9.11.4.orig/debian/README.Debian +++ prewikka-0.9.11.4/debian/README.Debian @@ -0,0 +1,130 @@ +prewikka for Debian +------------------- + +The Prewikka installation guide is available at: +https://trac.prelude-ids.org/wiki/InstallingPrewikka + + +Editing prewikka.conf +===================== + +Once you have created the database for Prewikka you need to edit /etc/prewikka/prewikka.conf to fit your database settings prior to starting Prewikka. +The debian installation script will try to create the database and set the values, for the [database] section ONLY. +Even if you used the installer to create the database and tables, you will need to edit the configuration file for +other values. + +[interface] +#This is the name at the top right and left of the Prewikka interface +#You can change it or leave as is +software: Prewikka +place: company ltd. +title: Prelude management + +#The following are the setting for your prelude database +[idmef_database] +type: mysql +host: localhost +user: prelude +pass: prelude +name: prelude + +#This is the database information for the prewikka DB you created above +[database] +type: mysql +host: localhost +user: prewikka +pass: prewikka +name: prewikka + +#You can comment this out to stop logs from writing to stderr +[log stderr] + +#No real need to edit this except to increase/decrease expiration time +[auth loginpassword] +expiration: 60 + + + + + +Choose one of the following methods to configure your web server: + +Running Prewikka from the Apache web server (CGI/Apache) +======================================================== + +Apache / CGI setup with VirtualHost +----------------------------------- + + + ServerName my.server.org + Setenv PREWIKKA_CONFIG "/etc/prewikka/prewikka.conf" + + + AllowOverride None + Options ExecCGI + + + AddHandler cgi-script .cgi + + + Order allow,deny + Allow from all + + +Alias /prewikka/ /usr/share/prewikka/htdocs/ +ScriptAlias / /usr/share/prewikka/cgi-bin/prewikka.cgi + + + +Note that the PREWIKKA_CONFIG environment variable is optional, if unset the default configuration file relative to your installation path will be used. + + +Apache / mod_python setup with VirtualHost +------------------------------------------ + +Experimental mod_python support is available in Prewikka starting from rc9. + + + ServerName my.server.org + + + SetHandler mod_python + PythonHandler prewikka.ModPythonHandler + PythonOption PrewikkaConfig /etc/prewikka/prewikka.conf + + + + SetHandler None + + + Alias /prewikka /usr/share/prewikka/htdocs + + +Note that the PrewikkaConfig? settings is optional, if unset the default configuration file relative to your installation path will be used. + + + +Running Prewikka from the command line tool +=========================================== + +If you didn't install Prewikka system wide (ie: you specified a prefix), use: + + $ PYTHONPATH=$prefix/lib/python2.4/site-packages $prefix/bin/prewikka-httpd + +If you installed Prewikka system wide: + + $ /usr/bin/prewikka-httpd + +You can then use your browser to connect to your machine on port 8000. The default login/password is admin please remember to change it. + + + +Initial login +============= + +Once everything is setup, you can use your browser to connect to the machine were Prewikka was installed. If you are not using Apache support, then remeber you should use the port 8000 to access Prewikka. + +The default login/password is admin please remember to change it. + + + -- Pierre Chifflier Wed, 7 Feb 2007 16:51:26 +0100 --- prewikka-0.9.11.4.orig/debian/prewikka.postrm +++ prewikka-0.9.11.4/debian/prewikka.postrm @@ -0,0 +1,38 @@ +#!/bin/sh +# postrm script for prewikka +# +# see: dh_installdeb(1) + +set -e + +. /usr/share/debconf/confmodule +db_version 2.0 || [ $? -lt 30 ] + +if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postrm + dbc_go prewikka $@ +fi + +if [ "$1" = "purge" ]; then + + rm -f /etc/prewikka/prewikka.conf + rm -f /etc/prewikka/prewikka.conf-new /etc/prewikka/prewikka.conf.ucf-dist /etc/prewikka/prewikka.conf.ucf-old + if which ucf >/dev/null 2>&1; then + ucf --purge /etc/prewikka/prewikka.conf + fi + + rmdir --ignore-fail-on-non-empty /etc/prewikka || true + +fi + +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi + + +#DEBHELPER# + +exit 0 + + --- prewikka-0.9.11.4.orig/debian/dirs +++ prewikka-0.9.11.4/debian/dirs @@ -0,0 +1,6 @@ +etc/prewikka +usr/bin +usr/sbin +usr/share/dbconfig-common/data/prewikka/install +usr/share/dbconfig-common/data/prewikka/upgrade/mysql +usr/share/dbconfig-common/data/prewikka/upgrade/pgsql --- prewikka-0.9.11.4.orig/debian/watch +++ prewikka-0.9.11.4/debian/watch @@ -0,0 +1,9 @@ +# debian watch file +# You can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +http://prelude-ids.org/download/releases/prewikka-([0-9].*)\.tar\.gz