diff options
author | Maxim Koltsov <maksbotan@gentoo.org> | 2011-08-31 08:36:54 +0000 |
---|---|---|
committer | Maxim Koltsov <maksbotan@gentoo.org> | 2011-08-31 08:36:54 +0000 |
commit | 909d46c8cbc21a4fd2cfaacfcb0249a40cf1f2c4 (patch) | |
tree | ca8b05678cc4e84cd2ea2bff1012839b4c72240f /app-admin/sagan | |
parent | Marked stable on AMD64 based on arch testing by Ian "idella" Delaney & Elijah... (diff) | |
download | gentoo-2-909d46c8cbc21a4fd2cfaacfcb0249a40cf1f2c4.tar.gz gentoo-2-909d46c8cbc21a4fd2cfaacfcb0249a40cf1f2c4.tar.bz2 gentoo-2-909d46c8cbc21a4fd2cfaacfcb0249a40cf1f2c4.zip |
Add app-admin/sagan, bug #341461
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/sagan')
-rw-r--r-- | app-admin/sagan/ChangeLog | 10 | ||||
-rw-r--r-- | app-admin/sagan/files/sagan.confd | 9 | ||||
-rw-r--r-- | app-admin/sagan/files/sagan.init | 22 | ||||
-rw-r--r-- | app-admin/sagan/metadata.xml | 17 | ||||
-rw-r--r-- | app-admin/sagan/sagan-0.2.0.ebuild | 85 |
5 files changed, 143 insertions, 0 deletions
diff --git a/app-admin/sagan/ChangeLog b/app-admin/sagan/ChangeLog new file mode 100644 index 000000000000..bcb6926c6f4e --- /dev/null +++ b/app-admin/sagan/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for app-admin/sagan +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/ChangeLog,v 1.1 2011/08/31 08:36:54 maksbotan Exp $ + +*sagan-0.2.0 (31 Aug 2011) + + 31 Aug 2011; Maxim Koltsov <maksbotan@gentoo.org> +sagan-0.2.0.ebuild, + +files/sagan.confd, +files/sagan.init, +metadata.xml: + Copy app-admin/sagan from rion-overlay, thanks to slepnoga. Bug 341461 + diff --git a/app-admin/sagan/files/sagan.confd b/app-admin/sagan/files/sagan.confd new file mode 100644 index 000000000000..cab6db55ccf0 --- /dev/null +++ b/app-admin/sagan/files/sagan.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2011 Gentoo Foundation +# # Distributed under the terms of the GNU General Public License v2 + +# Sagan daemon configuration file +# Make debug mode +# SAGAN_OPTS = " --debug " +# +# Run as user, default sagan +SAGAN_USER="sagan" diff --git a/app-admin/sagan/files/sagan.init b/app-admin/sagan/files/sagan.init new file mode 100644 index 000000000000..7f497d649814 --- /dev/null +++ b/app-admin/sagan/files/sagan.init @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/files/sagan.init,v 1.1 2011/08/31 08:36:54 maksbotan Exp $ + + +depend() { + use logger mysql postgresql net + need localmount +} + +start() { + ebegin "Starting sagan" + start-stop-daemon --start --pidfile /var/run/sagan/sagan.pid /usr/bin/sagan -- -D "${SAGAN_OPTS}" -u "${SAGAN_USER}" + eend $? +} + +stop() { + ebegin " Stopping sagan" + start-stop-daemon --stop --quiet --pidfile /var/run/sagan/sagan.pid + eend $? +} diff --git a/app-admin/sagan/metadata.xml b/app-admin/sagan/metadata.xml new file mode 100644 index 000000000000..1467fe127532 --- /dev/null +++ b/app-admin/sagan/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> +<maintainer> + <email>spamslepnoga@inbox.ru</email> +</maintainer> +<maintainer> + <email>maksbotan@gentoo.org</email> +</maintainer> +<use> + <flag name='smtp'>Build witch SMTP (E-Mail) support</flag> + <flag name='lognorm'>Add support for log/rules normalizations via <pkg>dev-libs/liblognorm</pkg></flag> + <flag name='pcap'>Add support for network packet capture via <pkg>net-libs/libpcap</pkg></flag> + <flag name='libdnet'>Add support for <pkg>dev-libs/libdnet</pkg></flag> +</use> +</pkgmetadata> diff --git a/app-admin/sagan/sagan-0.2.0.ebuild b/app-admin/sagan/sagan-0.2.0.ebuild new file mode 100644 index 000000000000..6554f9b7d344 --- /dev/null +++ b/app-admin/sagan/sagan-0.2.0.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sagan/sagan-0.2.0.ebuild,v 1.1 2011/08/31 08:36:54 maksbotan Exp $ + +EAPI=4 + +inherit eutils autotools-utils + +DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system" +HOMEPAGE="http://sagan.softwink.com/" +SRC_URI="http://sagan.softwink.com/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="smtp mysql postgres prelude +lognorm +libdnet +pcap" + +DEPEND="dev-util/pkgconfig + ${RDEPEND}" + +RDEPEND="dev-libs/libpcre + app-admin/sagan-rules + smtp? ( net-libs/libesmtp ) + pcap? ( net-libs/libpcap ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql-base ) + prelude? ( dev-libs/libprelude ) + lognorm? ( dev-libs/liblognorm ) + libdnet? ( dev-libs/libdnet )" + +AUTOTOOLS_IN_SOURCE_BUILD=1 +DOCS=(AUTHORS ChangeLog FAQ INSTALL README NEWS TODO) + +pkg_setup() { + enewgroup sagan + enewuser sagan -1 -1 /dev/null sagan +} + +src_configure() { + local myeconfargs=( + $(use_enable mysql) + $(use_enable postgres postgresql) + $(use_enable smtp esmtp) + $(use_enable prelude ) + $(use_enable lognorm) + $(use_enable libdnet) + $(use_enable pcap libpcap) ) + + autotools-utils_src_configure +} + +src_install() { + autotools-utils_src_install + + diropts -g sagan -o sagan -m 775 + + dodir /var/log/sagan + dodir /var/run/sagan + + keepdir /var/log/sagan + keepdir /var/run/sagan + + mkfifo -m 0640 "${ED}"/var/run/sagan.fifo + chown sagan.root "${ED}"/var/run/sagan.fifo + + touch "${ED}"/var/log/sagan/sagan.log + chown sagan.sagan "${ED}"/var/log/sagan/sagan.log + + newinitd "${FILESDIR}"/sagan.init sagan + newconfd "${FILESDIR}"/sagan.confd sagan + + insinto /usr/share/doc/${EP}/examples + doins -r extra/* +} + +pkg_postinst() { + if use smtp; then + ewarn "You have enabled smtp use flag. If you plan on using Sagan with" + ewarn "email, create valid writable home directory for user 'sagan'" + ewarn "For security reasons it was created with /dev/null home directory" + fi + + einfo "For configuration assistance see" + einfo "http://wiki.quadrantsec.com/bin/view/Main/SaganHOWTO" +} |