summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-admin/sagan
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-admin/sagan')
-rw-r--r--app-admin/sagan/Manifest2
-rw-r--r--app-admin/sagan/files/json_header_location.patch26
-rw-r--r--app-admin/sagan/files/mysql_check.patch26
-rw-r--r--app-admin/sagan/files/sagan.confd9
-rw-r--r--app-admin/sagan/files/sagan.init18
-rw-r--r--app-admin/sagan/files/sagan.init-r118
-rw-r--r--app-admin/sagan/metadata.xml24
-rw-r--r--app-admin/sagan/sagan-0.2.3.ebuild86
-rw-r--r--app-admin/sagan/sagan-1.0.0_rc3.ebuild90
9 files changed, 299 insertions, 0 deletions
diff --git a/app-admin/sagan/Manifest b/app-admin/sagan/Manifest
new file mode 100644
index 000000000000..01f4b1459f2a
--- /dev/null
+++ b/app-admin/sagan/Manifest
@@ -0,0 +1,2 @@
+DIST sagan-0.2.3.tar.gz 231774 SHA256 fc50697cf8ce0fe7c1c662a57a9526710e649c2bf8088acdef46010e06e5ddf2 SHA512 2110f3d34db69cb5c453b8e37d06debeea7531ebf15a9b78954ac1657ddce34feaaff87d14695759c3deb2eed5ecc0e6fec5881fb5037af8efa6c3c9600242cc WHIRLPOOL 417d78263a907c89a865a41228ffc6e2184e1d37d1d583ee0c42da991c411cd40e99b2d537e11a7712615643f57b406439cb5af84a1eacc12a2ef7ca96c72533
+DIST sagan-1.0.0RC3.tar.gz 285207 SHA256 527ddcb583f362c92eca5557cda2116a64200da3f868b512f42abbf78b961508 SHA512 29388a339b290bb4de2359c0c54b9e1d43ef207b223a499a1a4faa36de4d9590a777a796dd773948e995d052b71f3ef47ca5bad5c133116c4dbb53b4fe336123 WHIRLPOOL 35e18084056d15dae578378df4c335fb98ebbb1514b0762a573e4b3507253ac00ee944f06f2f443a2e8cef44c19d312e936923f9223314d8970cec4ae332f36e
diff --git a/app-admin/sagan/files/json_header_location.patch b/app-admin/sagan/files/json_header_location.patch
new file mode 100644
index 000000000000..78a34886a73d
--- /dev/null
+++ b/app-admin/sagan/files/json_header_location.patch
@@ -0,0 +1,26 @@
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -194,7 +194,7 @@
+ if test "$LOGNORM" = "yes"; then
+ AC_MSG_RESULT([------- liblognorm support is enabled -------])
+ AC_CHECK_HEADER([liblognorm.h])
+- AC_CHECK_HEADERS([json/json.h json.h], [break], [AC_MSG_ERROR([json-c headers not found or not usable.
++ AC_CHECK_HEADERS([json-c/json.h json.h], [break], [AC_MSG_ERROR([json-c headers not found or not usable.
+ This library is important for the correlation aspects of Sagan! Please see
+ https://wiki.quadrantsec.com/bin/view/Main/LibLogNorm. To disable this feature
+ use the --disable-lognorm flag.])])
+diff --git a/src/sagan-liblognorm.c b/src/sagan-liblognorm.c
+--- a/src/sagan-liblognorm.c
++++ b/src/sagan-liblognorm.c
+@@ -40,9 +40,7 @@
+ #include <lognorm.h>
+
+ #if defined(HAVE_JSON_JSON_H)
+-# include <json/json.h>
+-#else
+-# include <json.h>
++# include <json-c/json.h>
+ #endif
+
+ #include "sagan.h"
diff --git a/app-admin/sagan/files/mysql_check.patch b/app-admin/sagan/files/mysql_check.patch
new file mode 100644
index 000000000000..d2247aab571e
--- /dev/null
+++ b/app-admin/sagan/files/mysql_check.patch
@@ -0,0 +1,26 @@
+diff --git a/configure.in b/configure.ac
+rename from configure.in
+rename to configure.ac
+--- a/configure.in
++++ b/configure.ac
+@@ -215,13 +215,17 @@
+ AC_CHECK_LIB(pthread, main,,AC_MSG_ERROR(Sagan needs pthreads!))
+ AC_CHECK_LIB(m, main,,AC_MSG_ERROR(Sagan needs libm!))
+
++save_LIBS=$LIBS
+ if test "$MYSQL" = "yes"; then
+ AC_MSG_RESULT([------- MySQL support is enabled -------])
++ AC_CHECK_PROGS(MYSQL_CONFIG, mysql_config)
+ AC_CHECK_HEADER([mysql/mysql.h])
+ AC_CHECK_HEADER([mysql/errmsg.h])
+- AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!
+-If you're not interested in MySQL support use the --disable-mysql flag.))
+- fi
++ LIBS=$(mysql_config --libs_r)
++ AC_CHECK_LIB(mysqlclient_r, main,,AC_MSG_ERROR(The MySQL library libmysqlclient_r is missing!))
++fi
++LIBS="$save_LIBS $LIBS"
++
+
+ if test "$POSTGRES" = "yes"; then
+ AC_MSG_RESULT([------- PostgreSQL support is enabled -------])
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..dfce6cadf336
--- /dev/null
+++ b/app-admin/sagan/files/sagan.init
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/sagan/sagan.pid"
+command="/usr/bin/sagan"
+command_args="-D \"${SAGAN_OPTS}\" -u \"${SAGAN_USER}\""
+
+depend() {
+ use logger mysql postgresql
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -o sagan /var/run/sagan
+ checkpath -p -o sagan -m 0644 /var/run/sagan/sagan.fifo
+}
diff --git a/app-admin/sagan/files/sagan.init-r1 b/app-admin/sagan/files/sagan.init-r1
new file mode 100644
index 000000000000..5844fdf4e1de
--- /dev/null
+++ b/app-admin/sagan/files/sagan.init-r1
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/sagan/sagan.pid"
+command="/usr/bin/sagan"
+command_args="-D \"${SAGAN_OPTS}\" -u \"${SAGAN_USER}\""
+
+depend() {
+ use logger mysql postgresql
+ need localmount
+}
+
+start_pre() {
+ checkpath -d -o sagan /run/sagan
+ checkpath -p -o sagan -m 0644 /run/sagan/sagan.fifo
+}
diff --git a/app-admin/sagan/metadata.xml b/app-admin/sagan/metadata.xml
new file mode 100644
index 000000000000..0d04c216b673
--- /dev/null
+++ b/app-admin/sagan/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>andreis.vinogradovs@gmail.com</email>
+ <name>Andreis Vinogradovs</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+ <maintainer>
+ <email>qnikst@gentoo.org</email>
+ <name>Alexander Vershilov</name>
+ </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>
+ <flag name='snort'>Add support to interact with Snort IDE using <pkg>net-analyzer/snortsam</pkg>'</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-admin/sagan/sagan-0.2.3.ebuild b/app-admin/sagan/sagan-0.2.3.ebuild
new file mode 100644
index 000000000000..19c5c57be205
--- /dev/null
+++ b/app-admin/sagan/sagan-0.2.3.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils user
+
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system"
+HOMEPAGE="http://sagan.quadrantsec.com/"
+SRC_URI="http://sagan.quadrantsec.com/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+libdnet +lognorm mysql +pcap postgres smtp snort"
+
+RDEPEND="dev-libs/libpcre
+ app-admin/sagan-rules[lognorm?]
+ smtp? ( net-libs/libesmtp )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ lognorm? ( dev-libs/liblognorm )
+ libdnet? ( dev-libs/libdnet )
+ snort? ( >=net-analyzer/snortsam-2.50 )
+ "
+
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL README NEWS TODO )
+PATCHES=( "${FILESDIR}"/mysql_check.patch )
+
+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 lognorm)
+ $(use_enable libdnet)
+ $(use_enable pcap libpcap)
+ $(use_enable snort snortsam)
+ --disable-prelude
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ diropts -g sagan -o sagan -m 775
+
+ dodir /var/log/sagan
+
+ keepdir /var/log/sagan
+
+ 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/${PF}/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"
+}
diff --git a/app-admin/sagan/sagan-1.0.0_rc3.ebuild b/app-admin/sagan/sagan-1.0.0_rc3.ebuild
new file mode 100644
index 000000000000..871c024e8f2e
--- /dev/null
+++ b/app-admin/sagan/sagan-1.0.0_rc3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit eutils autotools-utils user
+
+DESCRIPTION="Sagan is a multi-threaded, real time system and event log monitoring system"
+HOMEPAGE="http://sagan.quadrantsec.com/"
+SRC_URI="http://sagan.quadrantsec.com/download/sagan-1.0.0RC3.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="geoip +libdnet +lognorm mysql +pcap smtp snort"
+
+RDEPEND="dev-libs/libpcre
+ app-admin/sagan-rules[lognorm?]
+ smtp? ( net-libs/libesmtp )
+ pcap? ( net-libs/libpcap )
+ mysql? ( virtual/mysql )
+ lognorm? (
+ dev-libs/liblognorm
+ dev-libs/json-c
+ dev-libs/libee
+ dev-libs/libestr
+ )
+ libdnet? ( dev-libs/libdnet )
+ snort? ( >=net-analyzer/snortsam-2.50 )
+ geoip? ( dev-libs/geoip )
+ "
+
+DEPEND="virtual/pkgconfig
+ ${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog FAQ INSTALL README NEWS TODO )
+PATCHES=( "${FILESDIR}"/json_header_location.patch )
+S="${WORKDIR}/sagan-1.0.0RC3/"
+
+pkg_setup() {
+ enewgroup sagan
+ enewuser sagan -1 -1 /dev/null sagan
+}
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable smtp esmtp)
+ $(use_enable lognorm)
+ $(use_enable libdnet)
+ $(use_enable pcap libpcap)
+ $(use_enable snort snortsam)
+ $(use_enable geoip)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+
+ diropts -g sagan -o sagan -m 775
+
+ dodir /var/log/sagan
+
+ keepdir /var/log/sagan
+
+ touch "${ED}"/var/log/sagan/sagan.log
+ chown sagan.sagan "${ED}"/var/log/sagan/sagan.log
+
+ newinitd "${FILESDIR}"/sagan.init-r1 sagan
+ newconfd "${FILESDIR}"/sagan.confd sagan
+
+ insinto /usr/share/doc/${PF}/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"
+}