Commit 3d67f589 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added debian packaging files

Change-Id: I02b49df601977294a9e4371ea1b1498ca05a42fc
parent 8a9a696a
etc/cbpolicyd
etc/apache2/conf-available
# Webui
webui usr/share/cluebringer
contrib/httpd/cluebringer-httpd.conf etc/apache2/conf-available
## TODO ##
# apache config
etc/cbpolicyd/webui.conf usr/share/cluebringer/webui/includes/config.php
# File contains mysql password
cluebringer-webui: non-standard-file-perm etc/cbpolicyd/webui.conf 0640 != 0644
#!/bin/sh -e
set -e
case "${1}" in
configure)
chgrp www-data /etc/cbpolicyd/webui.conf
chmod 0640 /etc/cbpolicyd/webui.conf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`${1}'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh
/usr/bin/cbpadmin --cleanup
var/log/cbpolicyd
#!/bin/sh
### BEGIN INIT INFO
# Provides: cbpolicyd
# Required-Start: $remote_fs $syslog mysql
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Postfix Policy Daemon
### END INIT INFO
set -e
DAEMON="/usr/sbin/cbpolicyd"
NAME="cbpolicyd"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
LOGFILE="/var/log/cbpolicyd/cluebringer.log"
RUNDIR="/var/run/cbpolicyd"
test -x "${DAEMON}" || exit 0
if [ ! -e "${LOGFILE}" ]
then
touch "${LOGFILE}"
chmod 640 "${LOGFILE}"
chown root:cbpolicyd "${LOGFILE}"
fi
if [ ! -d "${RUNDIR}" ]
then
mkdir -p "${RUNDIR}"
chmod 700 "${RUNDIR}"
chown cbpolicyd "${RUNDIR}"
fi
case "${1}" in
start)
echo -n "Starting PolicyD: "
start-stop-daemon --start --oknodo --pidfile /var/run/cbpolicyd/cbpolicyd.pid --exec ${DAEMON}
echo "${NAME}."
;;
stop)
echo -n "Stopping PolicyD: "
start-stop-daemon --stop --pidfile /var/run/cbpolicyd/cbpolicyd.pid --oknodo
rm -f /var/run/cbpolicyd/cbpolicyd.pid
echo "${NAME}."
;;
restart)
echo -n "Stopping PolicyD: "
start-stop-daemon --stop --pidfile /var/run/cbpolicyd/cbpolicyd.pid --oknodo
rm -f /var/run/cbpolicyd/cbpolicyd.pid
echo "${NAME}."
echo -n "Starting PolicyD: "
start-stop-daemon --start --oknodo --pidfile /var/run/cbpolicyd/cbpolicyd.pid --exec ${DAEMON}
echo "${NAME}."
;;
reload|force-reload)
;;
status)
PID="$(cat /var/run/cbpolicyd/cbpolicyd.pid 2>/dev/null)" || true
if [ ! -f /var/run/cbpolicyd/cbpolicyd.pid ] || [ -z "${PID}" ]
then
echo "${NAME} is not running"
exit 3
fi
if ps "${PID}" >/dev/null 2>&1
then
echo "${NAME} is running"
exit 0
else
echo "${NAME} is not running"
exit 1
fi
;;
*)
echo "Usage: /etc/init.d/${NAME} {start|stop|restart|reload|status}"
exit 1
;;
esac
exit 0
# Main daemon
cbpolicyd usr/sbin
# Utils
cbpadmin usr/sbin
database/convert-tsql usr/sbin
# Libraries
cbp usr/lib/cbpolicyd-2.1
awitpt/awitpt usr/lib/cbpolicyd-2.1
# configs
cluebringer.conf etc/cbpolicyd
# Upstream doesn't ship a manpage yet
cluebringer: binary-without-manpage usr/sbin/cbpadmin
cluebringer: binary-without-manpage usr/sbin/cbpolicyd
cluebringer: binary-without-manpage usr/sbin/convert-tsql
# file contains mysql password
cluebringer: non-standard-file-perm etc/cbpolicyd/cluebringer.conf 0600 != 0644
# dir contains mmap cache file
cluebringer: non-standard-dir-perm var/log/cbpolicyd/ 0700 != 0755
/var/log/cbpolicyd/cbpolicyd.log {
weekly
rotate 5
copytruncate
compress
notifempty
missingok
}
#!/bin/sh
set -e
_USERNAME=cbpolicyd
_DIRECTORY=/var/lib/cbpolicyd
case "${1}" in
configure)
if ! getent passwd | grep -q "%{_USERNAME}"
then
adduser --system --home ${_DIRECTORY} --quiet --gecos 'cbpolicyd daemon' --group ${_USERNAME}
elif ! getent group | grep -q "^${_USERNAME}"
then
addgroup --system --quiet ${_USERNAME}
gpasswd -a ${_USERNAME} ${_USERNAME}
else
echo "cluebringer user (${_USERNAME}) already exists, doing nothing."
fi
chown root:cbpolicyd /var/log/cbpolicyd
chmod 0700 /var/log/cbpolicyd
chown cbpolicyd:cbpolicyd /var/lib/cbpolicyd
chmod 0750 /var/lib/cbpolicyd
chmod 0600 /etc/cbpolicyd/cluebringer.conf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`${1}'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
#!/bin/sh -e
if [ -x "/etc/init.d/cbpolicyd" ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d cbpolicyd stop || true
else
/etc/init.d/cbpolicyd stop || true
fi
fi
#DEBHELPER#
exit 0
Source: cluebringer
Maintainer: Nigel Kukard <nkukard@lbsd.net>
Section: contrib/mail
Priority: optional
Standards-Version: 3.9.1
Build-Depends: debhelper (>= 8)
Homepage: http://www.policyd.org/
Package: cluebringer
Architecture: all
Depends: ${perl:Depends}, ${misc:Depends}, adduser, mysql-client,
libdbd-mysql-perl, libnet-server-perl (>= 0.96), libnet-cidr-perl,
libconfig-inifiles-perl, libcache-fastmmap-perl, libmail-spf-perl
Replaces:
cluebringer-pgsql (<< 2.1.0),
cluebringer-mysql (<< 2.1.0),
cluebringer-sqlite3 (<< 2.1.0)
Breaks:
cluebringer-pgsql (<< 2.1.0),
cluebringer-mysql (<< 2.1.0),
cluebringer-sqlite3 (<< 2.1.0)
Recommends: cluebringer-webui
Suggests: mysql-server
Description: Postfix Policy Daemon
Policyd v2 (codenamed "cluebringer") is a multi-platform policy server
for popular MTAs. This policy daemon is designed mostly for large
scale mail hosting environments. The main goal is to implement as many
spam combating and email compliance features as possible while at the
same time maintaining the portability, stability and performance
required for mission critical email hosting of today. Most of the
ideas and methods implemented in Policyd v2 stem from Policyd v1
as well as the authors' long time involvement in large scale mail
hosting industry.
Package: cluebringer-webui
Architecture: all
Depends: ${misc:Depends}
Suggests: apache2, php5, php5-mysql
Description: Postfix Policy Daemon (webui)
Policyd v2 (codenamed "cluebringer") is a multi-platform policy server
for popular MTAs. This policy daemon is designed mostly for large
scale mail hosting environments. The main goal is to implement as many
spam combating and email compliance features as possible while at the
same time maintaining the portability, stability and performance
required for mission critical email hosting of today. Most of the
ideas and methods implemented in Policyd v2 stem from Policyd v1
as well as the authors' long time involvement in large scale mail
hosting industry.
.
This package contains the webui for Policyd.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: http://devlabs.linuxassist.net/projects/policyd/files
Files: *
Copyright: Copyright (C) 2009-2012, AllWorldIT
Copyright (C) 2008, LinuxRulz
Copyright (C) 2007, Nigel Kukard <nkukard@lbsd.net>
License: GPL-2+
This program 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; either
version 2 of the License, or (at your option) any later
version.
.
This program 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 systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.
#!/usr/bin/make -f
%:
dh $@
override_dh_install:
dh_install
mv debian/cluebringer-webui/usr/share/cluebringer/webui/includes/config.php debian/cluebringer-webui/etc/cbpolicyd/webui.conf
mv debian/cluebringer-webui/etc/apache2/conf-available/cluebringer-httpd.conf debian/cluebringer-webui/etc/apache2/conf-available/cluebringer.conf
override_dh_installdocs:
dh_installdocs AUTHORS TODO ChangeLog WISHLIST contrib database
override_dh_installinit:
dh_installinit --init-script=cbpolicyd
override_dh_fixperms:
dh_fixperms
chmod 0700 debian/cluebringer/var/log/cbpolicyd
chmod 0600 debian/cluebringer/etc/cbpolicyd/cluebringer.conf
chmod 0640 debian/cluebringer-webui/etc/cbpolicyd/webui.conf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment