summaryrefslogtreecommitdiff
path: root/net-analyzer/sguil-server
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/sguil-server
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/sguil-server')
-rw-r--r--net-analyzer/sguil-server/Manifest9
-rw-r--r--net-analyzer/sguil-server/files/sguild.confd25
-rw-r--r--net-analyzer/sguil-server/files/sguild.initd44
-rw-r--r--net-analyzer/sguil-server/metadata.xml12
-rw-r--r--net-analyzer/sguil-server/sguil-server-0.8.0.ebuild99
-rw-r--r--net-analyzer/sguil-server/sguil-server-0.9.0.ebuild99
6 files changed, 288 insertions, 0 deletions
diff --git a/net-analyzer/sguil-server/Manifest b/net-analyzer/sguil-server/Manifest
new file mode 100644
index 000000000000..3e1781f3bf0e
--- /dev/null
+++ b/net-analyzer/sguil-server/Manifest
@@ -0,0 +1,9 @@
+AUX sguild.confd 718 SHA256 8c0666711fa56030f51ef9e9b26f756a00c08c5457855f7554bb15311a062982 SHA512 48bf64ed2335367c6b11dafb7f157fc507398e2466e186602e3319891848b3b47a5f9a70a39d8d94ecba170a7604252f689d116442572c3bc71441b01e3c0e34 WHIRLPOOL 2da895958ada6bfaeb4c8cd593ca9be4359cb06b9c1ef1414e8be761baf6d38d44eb8cd7ba75b819a470e83e47ac406ed391b6f22e41d9cd5efa5193a9e142cc
+AUX sguild.initd 1198 SHA256 85a1c885c4a6fc6cc1866b61f56f37e2f49d4cc7b215e9367d4e5ef67ade207f SHA512 73bc162660ec36e568071026b6578a6e46215720cafdf957356307a341fcb159f201ba075d3f97563c81384da119f88a002f0f9e990071aef18026ad77e2e101 WHIRLPOOL 7b883ed6c0609c1d13410a285e01ac9896879d7f281429d61d1f4dc21c73dad8be29ceb19d2ea21fb3710381f66dff7e50804b2b6b11c547b98fd8ff244e7081
+DIST sguil-0.9.0.tar.gz 464204 SHA256 412be894d67a6487312dd16a98a580dda8c38cff2e24f7a6c25405857769782b SHA512 3f300901d0f0260fbc950b4c7604e3dc3eeb2d088ff45171db84e2d58e281242bf3582eac51162968f1f3766961aec4d0a7af54e85773102ee643a52e879cfa6 WHIRLPOOL eaaef918819ed781505abc727c65e08a9e6d6d0e53f842b5aa6ec4cd1278dc902375a45794b3989488c3507bc34e288593cd892c8a94293d8a7723bbdb6cef4e
+DIST sguil-server-0.8.0.tar.gz 102236 SHA256 faa7152ddbdc0ba797c79d6419bf3ae50bfd6dbba4b2cd28ccb04a55ef788360 SHA512 84161365579e3b4227314d9f61afad6ad220261525d7fc8016210a13ee607815eb33178bab026f8a217c43a42f2e623c41d579c5898f58207a18e31685426710 WHIRLPOOL e6f2709f1dd079bb1fa5fcd1c8010ac4a5c692410fec61aac1c6ede3dc7264077370667397b6b9b4a347df3b877e7fc61932340f02a087d828163457c6a9724a
+EBUILD sguil-server-0.8.0.ebuild 2716 SHA256 3db793964b75681ed324d2c4c88a54779f3691d2358aa27cd3c2962b7df641bc SHA512 69c4956fcec20c7813150fdcbb75f2df7ccc5b7691944967e03a88d63678e27d9d3179fd93a217e24880a5591e072891d0ad81931c7a847e04671d2c6a75383c WHIRLPOOL d2261d2a3949eb78f91c3ce2d68e2803ae8498d773914ea6d18a1501d5ea42e7099160bc88528bce76f74b8e81cf591cc79c57b90e15abfb6a504e041254bbb4
+EBUILD sguil-server-0.9.0.ebuild 2744 SHA256 35cc6cf37ab77de087f8c638c7277234407f0ef45a551e76fa830db2b7302072 SHA512 bae037820841e967a714d7b054a2830fb8dcc369729fce90132286b07abc7fa09fcb777c667a0b8a69a1182a584962dce47d0a7323f89a5a4762e06ec588e931 WHIRLPOOL 7a52286292b9d98baed127e5887d621e62025e4fb6298ff01e6dda0f191eef9d12ac1aef6005c69e3433f877243a26024818c3919eaecf9089bf47c3f3c75014
+MISC ChangeLog 3348 SHA256 75671b8ff5b3261881402a2e93c4b9a81cf3732d3f5ee0ff2f24f659a3302757 SHA512 c6086277d381532f467109292b0a5d20849876d5c727a0fb5777ba6838fba18c7c307e0a5a439f918031bbd7b2f312b04f1cc3aef24490b602328ae55cf1a632 WHIRLPOOL 3d525b8b82452979c6ffa3431516abbf9fb68c1a48deb35f23ada9891428fdb0805f28772ae45033156377c561596c63b74a34c9dac89578067dc9273f92b438
+MISC ChangeLog-2015 2826 SHA256 3065a539ba13447a8c4841c459c527cfc0f2c90e0733844fd117727ecada82cb SHA512 1e208c060732400b49cf093ebfc5630778de1361c6c2e551a77803899f0dfc78576c920ad2f0f13c01b916e9f0c28adb04198e87aae836144e12ddab849c89b2 WHIRLPOOL d94ecb94b907e80ae231713cd8b976c7488b34fbb995e23c4898f9ad2ddc1b4faeacca428a11f038d0d7f4e56d56e190a696e85f38ddd27ce58a81087e20c5dc
+MISC metadata.xml 418 SHA256 0be32877ea9dae6f000b93301bf6ba94b139f53032a34e758ab806e688722bb6 SHA512 bbe71ed5ce17f337808f82d4fe54ef68b94723a808c597a52d049b88b7334be9abb066911accf9175886405f3f02d37d838422a933afe8e00eeeac2c74ba5ed3 WHIRLPOOL 96fbf0ca145124d0c2e5419589dd84d6e292d4859b0145a4344090522edbe2026f500bdbbc7bb8f3d37122f54acf1339dd57ced7b5e86be7a289ca9ff2786b4e
diff --git a/net-analyzer/sguil-server/files/sguild.confd b/net-analyzer/sguil-server/files/sguild.confd
new file mode 100644
index 000000000000..216f6e60ad87
--- /dev/null
+++ b/net-analyzer/sguil-server/files/sguild.confd
@@ -0,0 +1,25 @@
+# Config file for /etc/init.d/sguild
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#PATH to the sguild config (sguild.conf) file.
+CONF=/etc/sguil/sguild.conf
+
+#PATH to the sguild config (autocat.conf) file.
+AUTOCAT=/etc/sguil/autocat.conf
+
+#PATH to the sguild global queries (sguild.queries) file.
+QUERIES=/etc/sguil/sguild.queries
+
+#PATH to the sguild users (sguild.users) file.
+USERS=/etc/sguil/sguild.users
+
+#PATH to the sguild access file
+ACCESS=/etc/sguil/sguild.access
+
+#Directory that contains sguild.pem and sguild.key
+#Uncomment to enable openssl connectivity
+#OPENSSLPATH="/etc/sguil/"
+
+#For any other options you wish to add
+#EXTRA_SGUILD_OPTS=
diff --git a/net-analyzer/sguil-server/files/sguild.initd b/net-analyzer/sguil-server/files/sguild.initd
new file mode 100644
index 000000000000..e4fec500feb9
--- /dev/null
+++ b/net-analyzer/sguil-server/files/sguild.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+[ -z "${CONF}" ] && CONF="/etc/sguil/sguild.conf"
+[ -z "${AUTOCAT}" ] && AUTOCAT="/etc/sguil/autocat.conf"
+[ -z "${QUERIES}" ] && QUERIES="/etc/sguil/sguild.queries"
+[ -z "${USERS}" ] && USERS="/etc/sguil/sguild.users"
+[ -z "${ACCESS}" ] && AUTOCAT="/etc/sguil/sguild.access"
+
+SGUILD_OPTS="-D -c ${CONF} -u ${USERS} -A ${ACCESS}"
+
+[ -n "${OPENSSLPATH}" ] && SGUILD_OPTS="${SGUILD_OPTS} -o -C ${OPENSSLPATH}"
+
+depend() {
+ need net
+ use mysql
+}
+
+checkconfig() {
+ [ -f "${CONF}" ] || return 1
+ [ -f "${AUTOCAT}" ] || return 1
+ [ -f "${QUERIES}" ] || return 1
+ [ -f "${USERS}" ] || return 1
+ [ -f "${ACCESS}" ] || return 1
+ if [ -n "${OPENSSLPATH}" ]; then
+ [ -f "${OPENSSLPATH}/sguild.key" ] || return 1
+ [ -f "${OPENSSLPATH}/sguild.pem" ] || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting sguild"
+ start-stop-daemon --start --quiet -c sguil --exec /usr/bin/sguild \
+ -- ${SGUILD_OPTS} ${EXTRA_SGUILD_OPTS} -D -P /run/sguild.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping sguild"
+ start-stop-daemon --stop --quiet --pidfile /run/sguild.pid
+ eend $?
+}
diff --git a/net-analyzer/sguil-server/metadata.xml b/net-analyzer/sguil-server/metadata.xml
new file mode 100644
index 000000000000..ca324d618d91
--- /dev/null
+++ b/net-analyzer/sguil-server/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">bammv/sguil</remote-id>
+ <remote-id type="sourceforge">sguil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild
new file mode 100644
index 000000000000..f6727a2fe11c
--- /dev/null
+++ b/net-analyzer/sguil-server/sguil-server-0.8.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib ssl-cert user
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="Daemon for Sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sourceforge.net"
+SRC_URI="mirror://sourceforge/sguil/sguil-server-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-tcltk/tclx-8.3
+ dev-tcltk/tcllib
+ dev-tcltk/mysqltcl
+ ssl? ( >=dev-tcltk/tls-1.4.1 )"
+RDEPEND="${DEPEND}
+ net-analyzer/p0f
+ net-analyzer/tcpflow
+ net-misc/openssh"
+
+S="${WORKDIR}/sguil-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sguil
+ enewuser sguil -1 -1 /var/lib/sguil sguil
+}
+
+src_prepare(){
+ sed -i \
+ -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \
+ -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \
+ -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \
+ -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \
+ -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \
+ server/sguild.conf || die
+}
+
+src_install(){
+ dodoc server/sql_scripts/*
+ dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \
+ doc/TODO doc/sguildb.dia
+
+ insopts -m640
+ insinto /etc/sguil
+ doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf}
+
+ insinto /usr/$(get_libdir)/sguild
+ doins server/lib/*
+ dobin server/sguild
+ newinitd "${FILESDIR}/sguild.initd" sguild
+ newconfd "${FILESDIR}/sguild.confd" sguild
+
+ if use ssl; then
+ sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild"
+ fi
+
+ diropts -g sguil -o sguil
+ keepdir \
+ /var/lib/sguil \
+ /var/lib/sguil/archive \
+ /var/lib/sguil/rules
+
+}
+
+pkg_postinst(){
+ if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then
+ install_cert /etc/sguil/sguild
+ fi
+
+ chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.*
+ chown -R sguil:sguil "${ROOT}"/usr/lib/sguild
+
+ if [ -d "${ROOT}"/etc/snort/rules ] ; then
+ ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME}
+ fi
+
+ elog
+ elog "Please customize the sguild configuration files in /etc/sguild before"
+ elog "trying to run the daemon. Additionally you will need to setup the"
+ elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information."
+ elog "Please note that it is STRONGLY recommended to mount a separate"
+ elog "filesystem at /var/lib/sguil for both space and performance reasons"
+ elog "as a large amount of data will be kept in the directory structure"
+ elog "underneath that top directory."
+ elog
+ elog "You should create the sguild db as per the install instructions in"
+ elog "/usr/share/doc/${PF}/ and use the appropriate"
+ elog "database setup script located in the same directory."
+
+ elog
+}
diff --git a/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild
new file mode 100644
index 000000000000..22db45ec08fd
--- /dev/null
+++ b/net-analyzer/sguil-server/sguil-server-0.9.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib ssl-cert user
+
+MY_PV="${PV/_p/p}"
+DESCRIPTION="Daemon for Sguil Network Security Monitoring"
+HOMEPAGE="http://sguil.sourceforge.net"
+SRC_URI="https://github.com/bammv/${PN/-server}/archive/v${PV}.tar.gz -> ${P/-server}.tar.gz"
+
+LICENSE="GPL-2 QPL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ssl"
+
+DEPEND="
+ >=dev-lang/tcl-8.3:0=[-threads]
+ >=dev-tcltk/tclx-8.3
+ dev-tcltk/tcllib
+ dev-tcltk/mysqltcl
+ ssl? ( >=dev-tcltk/tls-1.4.1 )"
+RDEPEND="${DEPEND}
+ net-analyzer/p0f
+ net-analyzer/tcpflow
+ net-misc/openssh"
+
+S="${WORKDIR}/sguil-${MY_PV}"
+
+pkg_setup() {
+ enewgroup sguil
+ enewuser sguil -1 -1 /var/lib/sguil sguil
+}
+
+src_prepare(){
+ sed -i \
+ -e 's:DEBUG 2:DEBUG 1:' -e 's:DAEMON 0:DAEMON 1:' \
+ -e 's:SGUILD_LIB_PATH ./lib:SGUILD_LIB_PATH /usr/lib/sguild:g' \
+ -e 's:/sguild_data/rules:/var/lib/sguil/rules:g' \
+ -e 's:/sguild_data/archive:/var/lib/sguil/archive:g' \
+ -e 's:/usr/lib/sguild:/usr/'$(get_libdir)'/sguild:g' \
+ server/sguild.conf || die
+}
+
+src_install(){
+ dodoc server/sql_scripts/*
+ dodoc doc/CHANGES doc/OPENSSL.README doc/USAGE doc/INSTALL \
+ doc/TODO doc/sguildb.dia
+
+ insopts -m640
+ insinto /etc/sguil
+ doins server/{sguild.email,sguild.users,sguild.conf,sguild.queries,sguild.access,autocat.conf}
+
+ insinto /usr/$(get_libdir)/sguild
+ doins server/lib/*
+ dobin server/sguild
+ newinitd "${FILESDIR}/sguild.initd" sguild
+ newconfd "${FILESDIR}/sguild.confd" sguild
+
+ if use ssl; then
+ sed -i -e "s/#OPENSSL/OPENSSL/" "${D}/etc/conf.d/sguild"
+ fi
+
+ diropts -g sguil -o sguil
+ keepdir \
+ /var/lib/sguil \
+ /var/lib/sguil/archive \
+ /var/lib/sguil/rules
+
+}
+
+pkg_postinst(){
+ if use ssl && ! [ -f "${ROOT}"/etc/sguil/sguild.key ]; then
+ install_cert /etc/sguil/sguild
+ fi
+
+ chown -R sguil:sguil "${ROOT}"/etc/sguil/sguild.*
+ chown -R sguil:sguil "${ROOT}"/usr/lib/sguild
+
+ if [ -d "${ROOT}"/etc/snort/rules ] ; then
+ ln -s /etc/snort/rules "${ROOT}"/var/lib/sguil/rules/${HOSTNAME}
+ fi
+
+ elog
+ elog "Please customize the sguild configuration files in /etc/sguild before"
+ elog "trying to run the daemon. Additionally you will need to setup the"
+ elog "mysql database. See /usr/share/doc/${PF}/INSTALL.gz for information."
+ elog "Please note that it is STRONGLY recommended to mount a separate"
+ elog "filesystem at /var/lib/sguil for both space and performance reasons"
+ elog "as a large amount of data will be kept in the directory structure"
+ elog "underneath that top directory."
+ elog
+ elog "You should create the sguild db as per the install instructions in"
+ elog "/usr/share/doc/${PF}/ and use the appropriate"
+ elog "database setup script located in the same directory."
+
+ elog
+}